:root { --ink: #102e47; --navy: #0b3150; --blue: #00a69b; --aqua: #00a69b; --ice: #eaf7f7; --line: #d6e2e6; --pale: #f5f8f8; --muted: #597082; --red: #b2433b; --green: #08745d; --amber: #e4942a; --white: #fff; }
* { box-sizing: border-box; } html { scroll-behavior: smooth; } body { margin: 0; color: var(--ink); background: var(--white); font-family: Poppins, Arial, sans-serif; font-size: 16px; line-height: 1.65; } a { color: inherit; } a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #f3b960; outline-offset: 3px; }
.site-header { min-height: 76px; padding: 0 clamp(1.25rem, 5vw, 5.6rem); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }.brand { display: inline-flex; gap: .65rem; align-items: center; color: var(--navy); font-size: 1.02rem; font-weight: 700; text-decoration: none; letter-spacing: -.025em; }.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; color: white; background: var(--navy); font-size: .68rem; letter-spacing: -.06em; }.header-link { color: var(--navy); font-size: .86rem; font-weight: 600; text-decoration: none; }.header-link span { color: var(--blue); margin-left: .2rem; }
.page-intro { padding: clamp(1.35rem, 3vw, 2.5rem) clamp(1.25rem, 8vw, 10rem) 3.4rem; background: transparent; }.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-bottom: 1.35rem; color: #63808f; font-size: .72rem; }.breadcrumb a { color: var(--blue); text-decoration: none; }.breadcrumb-home { display: inline-flex; align-items: center; gap: .3rem; }.breadcrumb-home svg { width: .9rem; height: .9rem; flex: 0 0 .9rem; }.breadcrumb strong { color: #4b6878; font-weight: 600; }.eyebrow { margin: 0 0 .45rem; color: var(--blue); font-size: .74rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }.page-intro h1 { max-width: 800px; margin: 0 0 .7rem; color: var(--navy); font-size: clamp(2.5rem, 5.2vw, 4.8rem); line-height: 1.06; letter-spacing: -.06em; }.page-intro > p:last-child { max-width: none; margin: 0; color: #3e5e70; font-size: 1.03rem; }
.calculator-shell { max-width: 1240px; margin: -1.1rem auto 0; padding: 0 1.25rem; }.calculator-shell > * { }.calculator-head { display: flex; justify-content: space-between; gap: 2rem; padding: 1.4rem 1.6rem; border: 1px solid #bdd9dc; border-radius: 16px 16px 0 0; background: var(--navy); }.calculator-head .eyebrow { color: #7adfe1; }.calculator-head h2 { margin: 0; color: white; font-size: 1.4rem; letter-spacing: -.03em; }.calculator-head > p { max-width: 420px; margin: 0; align-self: center; color: #c7dce5; font-size: .76rem; text-align: right; }.calculator-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 16px 16px; background: white; overflow: hidden; } form { padding: 1.7rem; } fieldset { min-width: 0; padding: 0; border: 0; } legend { margin-bottom: 1.15rem; color: var(--navy); font-size: .97rem; font-weight: 700; } legend span, .advanced summary b { width: 25px; height: 25px; display: inline-grid; place-items: center; margin-right: .5rem; border-radius: 50%; color: white; background: var(--blue); font-size: .7rem; }.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }.field { min-width: 0; }.field-full { grid-column: 1 / -1; }.field label { display: block; margin-bottom: .42rem; color: var(--navy); font-size: .78rem; font-weight: 600; }.compound { display: flex; } input, select { min-height: 43px; border: 0; border-radius: 7px; color: var(--ink); background: #eef5f6; font: inherit; font-size: .84rem; } input { width: 100%; padding: .55rem .7rem; } select { width: 100%; padding: .5rem 2.6rem .5rem .65rem; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%230b3150' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .85rem center; background-size: .78rem; }.compound input { border-radius: 7px 0 0 7px; }.compound select, .unit-display { width: auto; min-width: 82px; border-left: 1px solid #d8e4e7; border-radius: 0 7px 7px 0; background-color: #e7f0f2; }.unit-display { min-height: 43px; padding: .62rem .72rem; border: 0; color: #4e6b7a; font-size: .78rem; font-weight: 600; }.helper, .route-note, .input-error { margin: .38rem 0 0; font-size: .68rem; line-height: 1.5; }.helper { color: #617c89; }.route-note { margin-top: .9rem; padding: .55rem .65rem; border-left: 2px solid var(--aqua); color: #416070; background: #f2f9f9; }.input-error { min-height: 0; color: var(--red); font-weight: 600; }.input-error:not(:empty) { margin-top: .45rem; }.advanced { margin-top: 1.4rem; border: 1px solid #d9e4e7; border-radius: 9px; }.advanced summary { display: flex; align-items: center; justify-content: space-between; padding: .83rem .95rem; color: var(--navy); font-size: .82rem; font-weight: 700; cursor: pointer; list-style: none; }.advanced summary::-webkit-details-marker { display: none; }.advanced summary small { padding: .14rem .42rem; border-radius: 99px; color: #637985; background: #edf3f4; font-size: .61rem; font-weight: 600; }.advanced-inner { padding: 0 .95rem 1rem; border-top: 1px solid #e1eaed; }.advanced-intro { max-width: 680px; margin: .8rem 0 1rem; color: #55707d; font-size: .72rem; }.pressure-strip { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: 1.05rem; padding: .65rem .7rem; color: #557381; background: #f4f9f9; font-size: .67rem; font-weight: 600; }.pressure-strip span { padding: .14rem .35rem; border: 1px solid #cee1e3; border-radius: 4px; background: white; }.pressure-strip b { color: var(--blue); }.form-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1.4rem; }.primary-button, .copy-button { border: 0; border-radius: 8px; color: white; background: var(--navy); font-family: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }.primary-button { display: inline-flex; align-items: center; gap: .9rem; padding: .82rem 1rem; }.primary-button:hover, .copy-button:hover { background: #124870; }.text-button { border: 0; color: #5c7685; background: transparent; font-family: inherit; font-size: .76rem; text-decoration: underline; cursor: pointer; }.start-panel { padding: 2.1rem 1.45rem; color: #c9dce4; background: #103b5d; }.start-icon { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 1.1rem; border-radius: 9px; color: var(--navy); background: #82dfe1; font-size: 1.3rem; }.start-panel h3 { margin: 0 0 .5rem; color: white; font-size: 1.08rem; line-height: 1.4; }.start-panel p { margin: 0 0 1.45rem; font-size: .76rem; line-height: 1.7; }.start-points { display: grid; gap: .45rem; }.start-points span { padding: .35rem .45rem; border-left: 2px solid #72dadd; color: #e0eff2; background: rgba(255,255,255,.05); font-size: .65rem; font-weight: 600; }
.results-section { max-width: 1240px; margin: 3.3rem auto 0; padding: 0 1.25rem; }.result-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }.result-header h2, .content-section h2, .instructional-diagrams h2 { margin: 0; color: var(--navy); font-size: clamp(1.75rem, 3.4vw, 2.55rem); line-height: 1.2; letter-spacing: -.045em; }.copy-button { padding: .62rem .8rem; font-size: .72rem; }.primary-result { margin-top: 1.4rem; padding: clamp(1.35rem, 4vw, 2.5rem); border-radius: 15px 15px 0 0; color: white; background: linear-gradient(115deg, #0d3c60, #156875); }.result-label { color: #8ee9e9; font-size: .71rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }.primary-result p { margin: .35rem 0 .45rem; font-size: clamp(2.1rem, 5vw, 4rem); font-weight: 700; line-height: 1.08; letter-spacing: -.06em; }.result-summary { max-width: 700px; color: #d7edf0; font-size: .82rem; }.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 15px 15px; overflow: hidden; }.metric-grid article { min-height: 126px; padding: 1.15rem; border-right: 1px solid var(--line); background: white; }.metric-grid article:last-child { border-right: 0; }.metric-grid span { display: block; margin-bottom: .35rem; color: #67808d; font-size: .64rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }.metric-grid strong { display: block; color: var(--navy); font-size: 1.15rem; line-height: 1.2; letter-spacing: -.035em; }.metric-grid small { display: block; margin-top: .4rem; color: #6f8792; font-size: .64rem; line-height: 1.45; }.pressure-metric.pass strong { color: var(--green); }.pressure-metric.fail strong { color: var(--red); }.pressure-metric.pending strong { color: #7b8c94; }.why-result { margin-top: 1.1rem; padding: 1rem 1.1rem; border-left: 4px solid var(--aqua); background: #f1fafa; }.why-result h3 { margin: 0 0 .25rem; color: var(--navy); font-size: .91rem; }.why-result p { margin: 0; color: #3c5e6f; font-size: .78rem; }.table-wrap { margin-top: 1.1rem; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }.table-wrap table { width: 100%; min-width: 700px; border-collapse: collapse; text-align: left; }.table-wrap th { padding: .78rem .9rem; color: #64808e; background: #eef5f6; font-size: .65rem; letter-spacing: .07em; text-transform: uppercase; }.table-wrap td { padding: .8rem .9rem; border-top: 1px solid #e1eaec; color: #446372; font-size: .74rem; }.table-wrap tbody tr.recommended { background: #effafa; }.status { padding: .16rem .4rem; border-radius: 5px; font-size: .65rem; font-weight: 700; }.status.pass { color: #05735a; background: #def6eb; }.status.fail { color: #ad3d35; background: #ffe8e6; }.status.none { color: #708691; background: #eef2f3; }.math-details { margin-top: 1rem; border: 1px solid #d9e4e7; border-radius: 9px; background: white; }.math-details summary { padding: .8rem .95rem; color: var(--navy); font-size: .8rem; font-weight: 700; cursor: pointer; }.math-details > div { padding: 0 .95rem 1rem; color: #526f7e; font-size: .75rem; }.math-details p { margin: .45rem 0; }.math-details code, code { padding: .05rem .25rem; border-radius: 3px; color: #074d5d; background: #dff3f3; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
.instructional-diagrams { max-width: 1240px; margin: 4.7rem auto 0; padding: 0 1.25rem; display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.1rem; }.instructional-diagrams article { padding: clamp(1.2rem, 3vw, 2.2rem); border: 1px solid var(--line); border-radius: 15px; background: white; }.instructional-diagrams h2 { margin-bottom: .7rem; font-size: 1.55rem; }.instructional-diagrams p:not(.eyebrow) { color: #526e7c; font-size: .8rem; }.bore-diagram { display: grid; grid-template-columns: 1fr 1.12fr; gap: 1rem; align-items: center; }.selected-data { padding: .5rem .6rem; border-left: 2px solid var(--aqua); background: #f1f9f9; font-size: .68rem !important; }.bore-diagram svg { width: 100%; height: auto; }.pipe-cross circle:first-child { fill: #e3f0f1; stroke: #528293; stroke-width: 5; }.pipe-cross circle:nth-child(2) { fill: white; stroke: #8bb6c0; stroke-width: 2; }.pipe-cross path { stroke: #3b7383; stroke-width: 2; }.pipe-cross text { fill: #375d70; font-family: Poppins, sans-serif; font-size: 13px; font-weight: 700; text-anchor: middle; }.pipe-cross .bore-label { fill: #77a3ac; font-size: 11px; }.pipe-cross.active circle:first-child { fill: #bdecee; stroke: #15798b; }.dimension-label { fill: #5d7a86; font-family: Poppins, sans-serif; font-size: 12px; font-weight: 600; text-anchor: middle; }.velocity-diagram { display: flex; flex-direction: column; }.velocity-visual { display: grid; grid-template-columns: auto 1fr; gap: .5rem .8rem; align-items: center; margin-top: auto; padding-top: 1.1rem; }.velocity-visual span { color: #365f70; font-size: .68rem; font-weight: 700; }.velocity-visual span small { display: block; color: #788f99; font-size: .61rem; font-weight: 500; }.velocity-visual i { height: 19px; display: block; border-radius: 99px; background: repeating-linear-gradient(90deg, #e28d54 0 12px, #f9c790 12px 17px); }.velocity-visual i.pipe-recommended { height: 27px; background: repeating-linear-gradient(90deg, #1eafba 0 18px, #99e0e3 18px 23px); }.velocity-visual i.pipe-large { height: 37px; background: repeating-linear-gradient(90deg, #6ca7b5 0 25px, #cae7eb 25px 31px); }.velocity-visual b { grid-column: 1 / -1; margin: .25rem 0 -.15rem; color: #6a8390; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; }
.content-section { max-width: 1100px; margin: 5rem auto 0; padding: 0 1.25rem; }.content-section > h2 { margin-bottom: 1.5rem; }.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; padding: 0; list-style: none; counter-reset: step; }.steps li { position: relative; padding: 1.12rem; border-top: 3px solid var(--aqua); background: #f4f9f9; counter-increment: step; }.steps li::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: .55rem; color: var(--blue); font-size: .69rem; font-weight: 700; letter-spacing: .1em; }.steps h3, .copy-grid h3, .example-layout h3 { margin: 0 0 .45rem; color: var(--navy); font-size: .88rem; line-height: 1.4; }.steps p, .copy-grid p, .example-layout p, .limits-section > p { margin: 0; color: #526d7a; font-size: .75rem; line-height: 1.65; }.technical-section { max-width: none; padding: 4.6rem max(1.25rem, calc((100% - 1100px) / 2)); background: #0b3150; }.technical-section .eyebrow { color: #81e2e3; }.technical-section h2 { color: white; }.copy-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border: 1px solid #38627e; border-radius: 12px; }.copy-grid article { padding: 1.3rem; background: #103b5d; }.copy-grid h3 { color: white; }.copy-grid p { color: #c9dce3; }.copy-grid code { color: #a5eaeb; background: #1d5670; }.example-section { margin-top: 0; padding-top: 4.8rem; }.example-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1.5rem; padding: 1.7rem; border: 1px solid var(--line); border-radius: 13px; background: #fff; }.example-layout ul { padding-left: 1.05rem; margin: 1rem 0 0; color: #496878; font-size: .77rem; }.example-layout li { margin-bottom: .25rem; }.example-note { display: flex; flex-direction: column; justify-content: center; gap: .6rem; padding: 1.25rem; border-left: 3px solid var(--aqua); color: #426171; background: #eef9f9; font-size: .76rem; line-height: 1.6; }.example-note strong { color: var(--navy); }.pipe-table-section { margin-top: 4.8rem; }.section-lede { max-width: 800px; margin: -1rem 0 1.25rem; color: #55717f; font-size: .79rem; }.pipe-table-section .table-wrap { margin-top: 0; }.pipe-table-section td a, .source-link { color: var(--blue); font-weight: 600; }.conditions-section { max-width: none; padding: 4.6rem max(1.25rem, calc((100% - 1100px) / 2)); background: #f3f8f8; }.copy-grid.five { grid-template-columns: repeat(5, 1fr); border: 0; border-radius: 0; }.copy-grid.five article { border-top: 3px solid var(--aqua); background: white; }.copy-grid.five h3 { color: var(--navy); }.copy-grid.five p { color: #526f7e; }.limits-section { max-width: 850px; }.source-link { display: inline-block; margin-top: 1rem; font-size: .78rem; }.faq-section { padding-bottom: 5rem; }.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }.faq-grid details { padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 9px; background: #fff; }.faq-grid summary { color: var(--navy); font-size: .81rem; font-weight: 600; cursor: pointer; }.faq-grid p { margin: .7rem 0 0; color: #526f7e; font-size: .74rem; line-height: 1.6; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1.45rem clamp(1.25rem, 5vw, 5.6rem); color: #d6e8ed; background: #08283f; font-size: .76rem; } footer .brand { color: white; } footer .brand-mark { color: var(--navy); background: #7bdcdf; } footer p { margin: 0; } footer > a:last-child { color: #9de7e9; }
@media (max-width: 960px) { .calculator-layout { grid-template-columns: 1fr; }.start-panel { display: none; }.metric-grid { grid-template-columns: repeat(2, 1fr); }.metric-grid article:nth-child(2) { border-right: 0; }.metric-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }.instructional-diagrams { grid-template-columns: 1fr; }.steps { grid-template-columns: repeat(3, 1fr); }.copy-grid { grid-template-columns: repeat(2, 1fr); }.copy-grid.five { grid-template-columns: repeat(3, 1fr); }.bore-diagram { grid-template-columns: 1fr 1fr; } }
@media (max-width: 650px) { .site-header { min-height: 64px; }.header-link { font-size: .72rem; }.page-intro { padding-top: 1.25rem; padding-bottom: 3.2rem; }.breadcrumb { margin-bottom: 1.1rem; }.page-intro h1 { font-size: 2.55rem; }.page-intro > p:last-child { font-size: .92rem; }.calculator-shell { margin-top: -1.2rem; padding: 0 .7rem; }.calculator-head { display: block; padding: 1.15rem; }.calculator-head > p { margin-top: .5rem; text-align: left; }.calculator-layout form { padding: 1.15rem; }.field-grid { grid-template-columns: 1fr; gap: .95rem; }.field-full { grid-column: auto; }.pressure-strip { font-size: .6rem; }.results-section { padding: 0 .7rem; }.result-header { align-items: flex-start; flex-direction: column; }.metric-grid { grid-template-columns: 1fr; }.metric-grid article, .metric-grid article:nth-child(2) { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }.metric-grid article:last-child { border-bottom: 0; }.instructional-diagrams { margin-top: 3.8rem; padding: 0 .7rem; }.bore-diagram { grid-template-columns: 1fr; }.content-section { margin-top: 3.8rem; padding-left: .9rem; padding-right: .9rem; }.steps, .copy-grid, .copy-grid.five, .faq-grid { grid-template-columns: 1fr; }.technical-section, .conditions-section { padding: 3.7rem .9rem; }.example-layout { grid-template-columns: 1fr; padding: 1.15rem; }.example-note { border-top: 3px solid var(--aqua); border-left: 0; } footer { flex-direction: column; align-items: flex-start; } }

@media (min-width: 768px) {
  .site-header,
  .page-intro,
  footer { padding-left: max(12.5%, calc((100% - 1050px) / 2)); padding-right: max(12.5%, calc((100% - 1050px) / 2)); }
  .calculator-shell,
  .results-section,
  .instructional-diagrams,
  .content-section { width: min(75%, 1050px); max-width: none; padding-left: 0; padding-right: 0; }
  .technical-section,
  .conditions-section { width: 100%; padding-left: max(12.5%, calc((100% - 1050px) / 2)); padding-right: max(12.5%, calc((100% - 1050px) / 2)); }
}

/* Keep the fields defined without using the global orange focus outline. */
.calculator-layout input,
.calculator-layout select {
  border: 1px solid #c7d7dc;
}

.calculator-layout input:focus-visible,
.calculator-layout select:focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.faq-section .faq-grid {
  grid-template-columns: 1fr;
}

.calculator-layout {
  grid-template-columns: 1fr;
}

.page-toc {
  width: min(75%, 1050px);
  margin: 2.2rem auto 0;
  padding: 1.1rem 1.25rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f5fafa;
}

.page-toc-label {
  margin: 0 0 .6rem;
  color: var(--blue);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.page-toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .42rem 1.5rem;
  margin: 0;
  padding-left: 1.2rem;
}

.page-toc li { padding-left: .1rem; color: var(--blue); font-size: .75rem; }
.page-toc a { color: #365f70; text-decoration: none; }
.page-toc a:hover, .page-toc a:focus-visible { color: var(--blue); text-decoration: underline; text-underline-offset: .18em; }

@media (max-width: 767px) {
  .page-toc { width: auto; margin: 1.6rem .9rem 0; }
  .page-toc ol { grid-template-columns: 1fr; }
}

.bore-illustration {
  display: grid;
  align-content: center;
  gap: .55rem;
  margin: 0;
}

.bore-illustration img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.bore-illustration figcaption {
  color: #587580;
  font-size: .66rem;
  line-height: 1.5;
  text-align: center;
}

.velocity-illustration {
  display: grid;
  gap: .65rem;
  margin: auto 0 0;
  padding-top: 1.25rem;
}

.velocity-illustration img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.velocity-illustration figcaption {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .4rem;
  text-align: center;
}

.velocity-illustration figcaption span {
  color: #365f70;
  font-size: .65rem;
  line-height: 1.3;
}

.velocity-illustration figcaption b,
.velocity-illustration figcaption small {
  display: block;
}

.velocity-illustration figcaption b { font-weight: 700; }
.velocity-illustration figcaption small { color: #788f99; font-size: .61rem; }

@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: 1px solid #bdd9dc; border-radius: 10px; break-inside: avoid; }
  .result-header { padding: 1rem 1rem 0; }
  .result-header h2 { font-size: 1.35rem; }
  .result-actions, .result-technical-details { display: none !important; }
  .primary-result { margin-top: .8rem; padding: 1.15rem; background: #0d3c60 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .primary-result p { font-size: 2rem; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); border-color: #bdd9dc; }
  .metric-grid article { min-height: 0; padding: .85rem; border-color: #bdd9dc; }
  .why-result, .jobsite-summary, .result-warning-list, .table-wrap { break-inside: avoid; }
  .print-report + .results-card { margin-top: 0; }
}

.print-report { display: none; }

/* Use the same reading column as the page title and introduction at every width. */
@media (max-width: 767px) {
  .calculator-shell,
  .results-section,
  .instructional-diagrams,
  .content-section {
    width: auto;
    padding-left: clamp(1.25rem, 8vw, 10rem);
    padding-right: clamp(1.25rem, 8vw, 10rem);
  }

  .page-toc {
    width: auto;
    margin-left: clamp(1.25rem, 8vw, 10rem);
    margin-right: clamp(1.25rem, 8vw, 10rem);
  }
}

.result-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.result-actions .copy-button { display: inline-flex; align-items: center; justify-content: center; gap: .42rem; }
.result-actions .copy-button svg { width: .95rem; height: .95rem; flex: 0 0 .95rem; }
.copy-button.secondary, .secondary-button { color: var(--navy); background: #eef6f7; }
.copy-button.secondary:hover, .secondary-button:hover { color: white; background: var(--blue); }
.secondary-button { align-self: flex-start; margin-top: .3rem; padding: .65rem .8rem; border: 0; border-radius: 7px; font-family: inherit; font-size: .72rem; font-weight: 700; cursor: pointer; }
.result-basis { margin: 1.15rem 0 0; color: #627986; font-size: .67rem; line-height: 1.55; }
.jobsite-summary { margin-top: .85rem; padding: .8rem .9rem; border: 1px solid #c9e1e2; border-left: 3px solid var(--aqua); background: #f3fbfb; }
.jobsite-summary span { display: block; margin-bottom: .22rem; color: var(--blue); font-size: .61rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.jobsite-summary p { margin: 0; color: #365f70; font-size: .72rem; line-height: 1.55; }

.result-warning-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 1.3rem 0 0; padding: 0; list-style: none; }
.result-warning-list li { position: relative; min-height: 74px; padding: .9rem .9rem .9rem 2.5rem; border-left: 3px solid var(--aqua); color: #486875; background: white; font-size: .73rem; line-height: 1.55; }
.result-warning-list li::before { content: "!"; position: absolute; top: .92rem; left: .88rem; width: 1.05rem; height: 1.05rem; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: #e3f6f7; font-size: .67rem; font-weight: 700; }

.methodology-section { max-width: none; padding: 4.6rem max(1.25rem, calc((100% - 1100px) / 2)); background: #f4f9f9; }
.methodology-section { width: 100%; }

/* Increase reading copy without enlarging form controls, labels or data tables. */
.page-intro > p:last-child { font-size: 1.08rem; }
.calculator-head > p { font-size: .84rem; }
.instructional-diagrams p:not(.eyebrow) { font-size: .88rem; }
.example-layout p, .limits-section > p, .method-grid p { font-size: .84rem; }
.section-lede { font-size: .85rem; }
.why-result p, .jobsite-summary p { font-size: .81rem; }
.result-basis { font-size: .75rem; }
.faq-grid p { font-size: .82rem; }
.method-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border: 1px solid #d4e3e5; }
.method-grid article { padding: 1.25rem; background: white; }
.method-grid h3 { margin: 0 0 .5rem; color: var(--navy); font-size: .86rem; line-height: 1.35; }
.method-grid p { margin: 0; color: #526e7c; font-size: .84rem; line-height: 1.65; }
.method-grid a { color: var(--blue); font-weight: 700; }

@media (max-width: 960px) {
  .method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Keep the two explanatory visuals as page sections, not cards. */
.instructional-diagrams {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.instructional-diagrams article {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.instructional-diagrams article + article {
  margin-top: 2.4rem;
  padding-top: 0;
}

.velocity-diagram {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 2.4rem;
  align-items: center;
}

.velocity-diagram .velocity-illustration { margin: 0; padding-top: 0; }

/* Page navigation */
.page-toc {
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  width: min(75%, 1050px);
  margin: 2.7rem auto 0;
  padding: 1.35rem 1.45rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fbfb;
}

.toc-intro { padding: .2rem 0; }
.page-toc-label { margin: 0 0 .28rem; color: var(--navy); font-size: .88rem; font-weight: 700; letter-spacing: -.02em; text-transform: none; }
.toc-intro > p:last-child { margin: 0; color: #627b87; font-size: .68rem; line-height: 1.5; }

.page-toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem .7rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.page-toc li {
  min-width: 0;
  padding: 0;
  color: inherit;
  counter-increment: toc;
  font-size: .72rem;
}

.page-toc li::before {
  content: counter(toc, decimal-leading-zero);
  display: inline-grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  flex: 0 0 1.75rem;
  border-radius: 50%;
  color: var(--blue);
  background: #e9f7f7;
  font-size: .59rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.page-toc a {
  display: flex;
  min-height: 3rem;
  align-items: center;
  gap: .6rem;
  padding: .55rem .7rem;
  border: 1px solid #dce8ea;
  border-radius: 8px;
  color: #365f70;
  background: #fff;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.page-toc a::before {
  content: counter(toc, decimal-leading-zero);
  display: inline-grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  flex: 0 0 1.75rem;
  border-radius: 50%;
  color: var(--blue);
  background: #e9f7f7;
  font-size: .59rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.page-toc li::before { display: none; }
.page-toc a:hover { border-color: #99d5d8; color: var(--navy); background: #f3fbfb; text-decoration: none; }
.page-toc a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; color: var(--navy); text-decoration: none; }

.results-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.results-card .result-header { padding: 1.35rem 1.5rem; }
.results-card .primary-result { margin-top: 0; border-radius: 0; }
.results-card .metric-grid { border-right: 0; border-bottom: 0; border-left: 0; border-radius: 0; }
.result-details { padding: 0 1.5rem 1.5rem; }
.result-details .why-result { margin-top: 1.25rem; }
.result-details .math-details { margin-top: 1.1rem; }

@media (max-width: 650px) {
  .results-card .result-header { padding: 1.15rem; }
  .result-details { padding: 0 1.15rem 1.15rem; }
  .velocity-diagram { grid-template-columns: 1fr; gap: 1.1rem; }
  .instructional-diagrams article + article { margin-top: 2rem; padding-top: 0; }
  .result-actions { width: 100%; }
  .result-actions .copy-button { flex: 1 1 auto; }
  .result-warning-list, .method-grid { grid-template-columns: 1fr; }
  .methodology-section { padding: 3.7rem .9rem; }
  .page-toc { grid-template-columns: 1fr; gap: .9rem; width: auto; margin: 2rem clamp(1.25rem, 8vw, 10rem) 0; padding: 1.15rem; }
  .page-toc ol { grid-template-columns: 1fr; }
}

/* Larger readable content scale; headings intentionally retain their existing size. */
.breadcrumb { font-size: .8rem; }
.eyebrow { font-size: .8rem; }
.limits-section > .eyebrow {
  margin: 0 0 .45rem;
  color: var(--blue);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.35;
  text-transform: uppercase;
}
.page-intro > p:last-child { font-size: 1.12rem; }
.calculator-head > p { font-size: .92rem; }
.field label { font-size: .9rem; }
input, select { font-size: .94rem; }
.helper, .route-note, .input-error { font-size: .78rem; }
.advanced summary, .math-details summary { font-size: .9rem; }
.advanced-intro { font-size: .82rem; }
.pressure-strip { font-size: .77rem; }
.primary-button, .copy-button, .secondary-button, .text-button { font-size: .88rem; }
.result-label { font-size: .8rem; }
.result-summary { font-size: .94rem; }
.metric-grid span { font-size: .72rem; }
.metric-grid strong { font-size: 1.28rem; }
.metric-grid small { font-size: .74rem; }
.why-result p, .jobsite-summary p { font-size: .88rem; }
.result-basis { font-size: .81rem; }
.jobsite-summary span { font-size: .7rem; }
.table-wrap th { font-size: .72rem; }
.table-wrap td { font-size: .82rem; }
.math-details > div { font-size: .83rem; }
.instructional-diagrams p:not(.eyebrow) { font-size: .96rem; }
.selected-data { font-size: .8rem !important; }
.bore-illustration figcaption, .velocity-illustration figcaption span { font-size: .76rem; }
.velocity-illustration figcaption small { font-size: .7rem; }
.example-layout p, .limits-section > p, .method-grid p { font-size: .94rem; }
.section-lede { font-size: .93rem; }
.example-layout ul { font-size: .88rem; }
.example-note { font-size: .86rem; }
.result-warning-list li { font-size: .84rem; }
.page-toc li { font-size: .83rem; }
.page-toc-label { font-size: .96rem; }
.toc-intro > p:last-child { font-size: .78rem; }
.faq-grid summary { font-size: .9rem; }
.faq-grid p { font-size: .88rem; }

/* Keep the first visit focused on a recommendation; reveal engineering detail on demand. */
main { display: flex; flex-direction: column; }
.page-intro { order: 1; }
.calculator-shell { order: 2; }
.results-section { order: 3; }
.page-toc { order: 4; }
.instructional-diagrams { order: 5; margin-top: 3.4rem; }
.example-section { order: 6; }
.limits-section { order: 7; }
.faq-section { order: 8; }
.pipe-table-section { order: 9; }
.methodology-section { order: 10; }

.additional-options,
.result-technical-details,
.reference-details,
.methodology-details {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.additional-options { margin-top: 1.4rem; }
.additional-options summary b {
  width: 25px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  margin-right: .5rem;
  border-radius: 50%;
  color: white;
  background: var(--blue);
  font-size: .7rem;
}
.additional-options summary small {
  padding: .14rem .42rem;
  border-radius: 99px;
  color: #637985;
  background: #edf3f4;
  font-size: .61rem;
  font-weight: 600;
}
.additional-options summary {
  list-style: none;
  font-size: .9rem;
}
.additional-options summary > span {
  display: inline-flex;
  align-items: center;
  line-height: 1.25;
}
.additional-options summary > span > b {
  align-self: center;
  margin-top: 0;
  margin-bottom: 0;
}
.advanced summary > span {
  display: inline-flex;
  align-items: center;
  line-height: 1.25;
}
.advanced summary > span > b {
  align-self: center;
  margin-top: 0;
  margin-bottom: 0;
}
fieldset legend {
  display: flex;
  align-items: center;
  line-height: 1.25;
}
fieldset legend > span {
  align-self: center;
  margin-top: 0;
  margin-bottom: 0;
}
.additional-options summary::-webkit-details-marker { display: none; }
.additional-options summary,
.result-technical-details > summary,
.reference-details > summary,
.methodology-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}

.additional-options > .field { padding: 0 1rem 1rem; }
.result-technical-details { margin: 1.25rem 1.5rem 1.5rem; }
.result-technical-details .result-details { padding-top: 0; }
.result-technical-details > summary {
  list-style: none;
  font-weight: 500;
}
.result-technical-details > summary::-webkit-details-marker { display: none; }
.result-technical-details > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  display: block;
  flex: 0 0 8px;
  margin-left: auto;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .18s ease;
}
.result-technical-details[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.reference-details > summary {
  position: relative;
  display: block;
  padding-right: 3.25rem;
  list-style: none;
}
.reference-details > summary::-webkit-details-marker { display: none; }
.reference-details > summary::marker { content: ""; }
.reference-details > summary small {
  display: block;
  margin-top: .12rem;
}
.reference-details > summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  color: var(--blue);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
}
.reference-details > summary small,
.methodology-details > summary small { color: #69818c; font-weight: 400; }
.methodology-details > summary > span:first-child {
  display: grid;
  gap: .12rem;
}
.methodology-details > summary small { display: block; }
.methodology-details > summary > span:last-child {
  display: grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  flex: 0 0 1.35rem;
  color: var(--blue);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
}
.reference-details .table-wrap { margin: 0 1rem 1rem; }
.technical-bore { margin: 1rem 0 0; color: #526e7c; }
.technical-bore strong { color: var(--navy); }
.methodology-details .method-grid { margin: 0 1rem 1rem; }
.methodology-details .method-grid {
  grid-template-columns: 1fr;
  gap: .75rem;
  border: 0;
}
.methodology-details .method-grid article {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}
.methodology-section { padding-top: 2.4rem; padding-bottom: 2.4rem; }

/* Keep methodology directly beneath the pipe-family data at the same reading width. */
.methodology-section {
  width: min(75%, 1050px);
  max-width: none;
  margin: 1.25rem auto 0;
  padding: 0;
  background: transparent;
}

.methodology-details { background: transparent; }

@media (max-width: 767px) {
  .methodology-section {
    width: auto;
    margin: 1.25rem clamp(1.25rem, 8vw, 10rem) 0;
    padding: 0;
  }
}

.result-key-checks { grid-template-columns: repeat(3, 1fr); }

/* Keep longer checked-pipe names readable within the result card. */
.primary-result #result-size {
  font-size: clamp(1.75rem, 3.8vw, 3.15rem);
}

.example-note .secondary-button {
  color: white;
  background: var(--blue);
}

.example-note .secondary-button:hover {
  background: #0b7188;
}

.example-layout .example-assumptions {
  margin-top: 1.2rem;
}

/* Below the calculator, keep reading content and page navigation side by side. */
.page-body-layout {
  width: min(75%, 1050px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 245px;
  grid-template-areas: "content sidebar";
  gap: 3.5rem;
  align-items: start;
  margin: 3.4rem auto 0;
  padding-bottom: 3rem;
  order: 4;
}

.page-content {
  grid-area: content;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.page-sidebar {
  grid-area: sidebar;
  position: sticky;
  top: 1.5rem;
}

.page-body-layout .page-toc {
  width: auto;
  display: block;
  margin: 0;
  padding: 1.15rem;
}

.page-body-layout .page-toc ol { grid-template-columns: 1fr; }
.page-body-layout .page-toc a { min-height: 2.7rem; }

.page-body-layout .instructional-diagrams,
.page-body-layout .content-section {
  width: auto;
  max-width: none;
  margin-right: 0;
  margin-left: 0;
  padding-right: 0;
  padding-left: 0;
}

.page-body-layout .instructional-diagrams { margin-top: 0; }
.page-body-layout .page-content > .content-section:not(.methodology-section) {
  margin-top: 3rem;
}

/* The example used to carry its own extra top padding. Use the same gap before every main section instead. */
.page-body-layout .page-content > .example-section {
  padding-top: 0;
}
.page-body-layout .faq-section {
  padding-bottom: 0;
}
.page-body-layout .methodology-section { width: auto; margin: 1.25rem 0 3.5rem; padding: 0; }

.scenario-starters {
  display: grid;
  gap: .55rem;
  margin-bottom: 1.15rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fbfb;
}
.scenario-starters > summary {
  position: relative;
  display: grid;
  padding: 0 1.5rem 0 0;
  border: 0;
  background: transparent;
  list-style: none;
  cursor: pointer;
}
.scenario-starters > summary::-webkit-details-marker { display: none; }
.scenario-starters > summary::marker { content: ""; }
.scenario-starters > summary > span {
  display: grid;
  gap: .1rem;
}
.scenario-starters > summary > span > strong { color: var(--navy); font-size: .78rem; }
.scenario-button strong { color: var(--navy); font-size: .73rem; }
.scenario-starters > summary > span > span,
.scenario-button span {
  color: #587481;
  font-size: .65rem;
  line-height: 1.45;
}
.scenario-starters > summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: .9rem;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: translateY(-65%) rotate(45deg);
  transition: transform .18s ease;
}
.scenario-starters[open] > summary::after { transform: translateY(-35%) rotate(-135deg); }
.scenario-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.scenario-button {
  display: grid;
  gap: .15rem;
  min-width: 0;
  padding: .45rem .55rem;
  border: 1px solid #d9e8e9;
  border-radius: 6px;
  color: var(--navy);
  background: #f8fbfb;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.scenario-button:hover { border-color: var(--blue); background: #edfafa; }
.scenario-status { min-height: 0; margin: 0; color: #47707c; font-size: .68rem; }
.scenario-status:not(:empty) { min-height: 1.2rem; margin-top: .4rem; }

@media (min-width: 1000px) {
  .scenario-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .page-body-layout { gap: 2rem; grid-template-columns: minmax(0, 1fr) 220px; }
}

@media (max-width: 767px) {
  .page-body-layout {
    width: auto;
    grid-template-columns: 1fr;
    grid-template-areas: "sidebar" "content";
    gap: 2.4rem;
    margin: 2rem clamp(1.25rem, 8vw, 10rem) 0;
  }

  .page-sidebar { position: static; }
  .page-body-layout .page-toc { margin: 0; }
  .page-body-layout .page-content > .content-section:not(.methodology-section) { margin-top: 2.5rem; }
  .scenario-options { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .result-key-checks { grid-template-columns: 1fr; }
  .result-key-checks article { border-right: 0; border-bottom: 1px solid var(--line); }
  .result-key-checks article:last-child { border-bottom: 0; }
}

@media (max-width: 650px) {
  .result-technical-details { margin: 1.15rem; }
  .reference-details .table-wrap, .methodology-details .method-grid { margin-left: .7rem; margin-right: .7rem; }
  .additional-options summary,
  .advanced summary {
    align-items: flex-start;
    flex-direction: column;
    gap: .35rem;
  }
  .additional-options summary small,
  .advanced summary small {
    align-self: flex-start;
    margin-left: 2rem;
  }
}

.site-header .brand { color: var(--blue); }
.site-header .brand-mark { border-radius:0; background:var(--blue); -webkit-mask:url('/images/logo.svg') center / contain no-repeat; mask:url('/images/logo.svg') center / contain no-repeat; }
.site-header .brand-mark img { visibility:hidden; }
.pipe-cross.active circle:first-child { stroke:var(--blue); }

.page-sidebar .page-toc {
  border-color: #00a69b;
  background: #00a69b;
}

.page-sidebar .page-toc-label,
.page-sidebar .toc-intro > p:last-child { color: white; }

.page-sidebar .toc-intro > p:last-child { margin-bottom: .9rem; }

.page-sidebar .page-toc a {
  border: 0;
  color: white;
  background: rgba(255, 255, 255, .10);
  font-weight: 400;
}

.page-sidebar .page-toc a::before {
  color: #007c73;
  background: white;
}

.page-sidebar .page-toc a:hover {
  border-color: white;
  color: white;
  background: rgba(255, 255, 255, .20);
}

/* Keep each explanatory illustration under its heading rather than beside it. */
.bore-diagram,
.velocity-diagram {
  grid-template-columns: 1fr;
  gap: 1.35rem;
}

.page-body-layout .pipe-table-section { margin-top: 1.25rem; }
