@import url('/calculator-base.css');
@import url('/site-footer.css');

body { background: #fff; }
.page-intro { background: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.site-header { position: relative; z-index: 20; background: #fff; }
.page-intro, .calculator-shell, .results-section, .content-section { width: min(75%, 1050px); max-width: none; margin-right: auto; margin-left: auto; padding-right: 0; padding-left: 0; }
.page-intro { padding-top: clamp(1.35rem, 3vw, 2.5rem); padding-bottom: 2.3rem; }
.breadcrumb { align-items: center; margin: 0 0 1.3rem; font-size: .78rem; }
.breadcrumb a { color: var(--blue); text-decoration: none; }
.breadcrumb-home { display: inline-flex; align-items: center; gap: .35rem; }
.breadcrumb-home svg { width: .9rem; height: .9rem; flex: 0 0 .9rem; }
.page-intro .eyebrow { margin-bottom: .45rem; color: var(--blue); font-size: .74rem; font-weight: 700; letter-spacing: .13em; line-height: 1.35; text-transform: uppercase; }
.page-intro h1 { max-width: none; margin-bottom: .55rem; font-size: clamp(2.55rem, 5.2vw, 4.8rem); }
.page-intro > p { max-width: none; color: #426474; font-size: 1.06rem; line-height: 1.62; }
.calculator-shell { margin-top: 0; }
.calculator-head { align-items: center; padding: 1.35rem 1.5rem; border: 1px solid var(--line); border-radius: 13px 13px 0 0; background: var(--navy); }
.calculator-head .eyebrow { color: #7ce4dc; }
.calculator-head h2 { margin: 0; font-size: clamp(1.3rem, 2vw, 1.65rem); }
.calculator-head > p { max-width: 440px; margin: 0; color: #d4ebec; font-size: .84rem; line-height: 1.55; text-align: right; }
.calculator-layout { grid-template-columns: minmax(0, 1fr); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 13px 13px; }
.calculator-form { padding: 1.5rem; }
fieldset legend { display: flex; align-items: center; margin-bottom: 1.15rem; line-height: 1.25; }
legend span { flex: 0 0 25px; margin-right: .55rem; background: var(--blue); }
.field-grid { gap: 1rem; }
.field label, .field-label { font-size: .82rem; }
.optional-label { color: #617c89; font-size: .68rem; font-weight: 500; }
.calculator-form select { min-height: 43px; padding-right: 3rem; border: 1px solid #c7d7dc; color: var(--ink); appearance: none; background-color: #fff; 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 1rem center; background-size: .78rem; font-size: .86rem; }
.calculator-form input { min-height: 43px; border: 1px solid #c7d7dc; color: var(--ink); background: #fff; font-size: .86rem; }
.calculator-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); outline: none; }
.unit-display { min-height: 43px; border-color: #c7d7dc; background: #eef5f6; }
.helper { font-size: .71rem; }
.field-assumption { padding: .8rem .9rem; border: 1px solid #d6e6e8; border-radius: 8px; background: #f4fafa; }
.field-assumption p { margin: .3rem 0 0; color: #506f7c; font-size: .72rem; line-height: 1.55; }
.appliance-builder { margin-top: 1.3rem; padding: 1rem; border: 1px solid #d6e6e8; border-radius: 9px; background: #f8fbfb; }
.appliance-builder summary { color: var(--navy); font-size: .8rem; font-weight: 700; cursor: pointer; }
.appliance-builder summary span { margin-left: .35rem; color: #65808c; font-size: .63rem; font-weight: 600; text-transform: uppercase; }
.appliance-builder > p { margin: .5rem 0 .85rem; color: #55717d; font-size: .71rem; line-height: 1.55; }
.appliance-head, .appliance-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(155px, 1fr) 56px auto; gap: .6rem; align-items: center; }
.appliance-head { padding: 0 .1rem .35rem; color: #5d7885; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.appliance-rows { display: grid; gap: .55rem; }
.appliance-row :is(input, select) { min-width: 0; }
.appliance-row .compound input { min-width: 0; }
.appliance-row .unit-display { min-width: 60px; padding-right: .45rem; padding-left: .45rem; font-size: .68rem; }
.remove-appliance, .add-appliance { border: 1px solid #b8d6d7; border-radius: 6px; color: #186067; background: #fff; font: 600 .69rem Poppins, sans-serif; cursor: pointer; }
.remove-appliance { min-height: 40px; padding: .45rem .55rem; }
.add-appliance { padding: .52rem .68rem; }
.remove-appliance:hover, .add-appliance:hover { border-color: var(--blue); color: #075f5d; background: #eefafa; }
.appliance-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin-top: .8rem; }
.appliance-actions p { margin: 0; color: #55717d; font-size: .69rem; }
.form-actions { margin-top: 1.45rem; }
.primary-button { background: var(--blue); }
.primary-button:hover { background: #008b82; }
.text-button { font-size: .78rem; }
.results-section { margin-top: 3rem; }
.results-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.result-header { padding: 1.35rem 1.5rem 1rem; }
.result-header h2 { margin: 0; color: var(--navy); font-size: clamp(1.3rem, 2vw, 1.65rem); }
.result-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.copy-button { display: inline-flex; align-items: center; justify-content: center; gap: .43rem; min-height: 2.4rem; padding: .5rem .75rem; border: 1px solid #bcd9d7; border-radius: 7px; color: #008e84; background: #fff; font: 600 .72rem/1 Poppins, sans-serif; cursor: pointer; }
.copy-button:hover { border-color: var(--blue); color: #fff; background: var(--blue); }
.copy-button svg { width: .95rem; height: .95rem; flex: 0 0 .95rem; }
.primary-result { margin-top: 0; padding: 1.45rem 1.5rem; border-radius: 0; background: var(--navy); }
.result-label { color: #7ce4dc; }
.result-summary { color: #d4ebec; font-size: .86rem; }
.capacity-status { display: flex; gap: .45rem; align-items: baseline; margin-top: .8rem; padding: .65rem .75rem; border-left: 3px solid #76d9d2; color: #d4ebec; background: rgba(255,255,255,.08); font-size: .72rem; line-height: 1.5; }
.capacity-status strong { color: #b2f1e9; white-space: nowrap; }
.capacity-status.low-headroom { border-left-color: #f3bd64; background: rgba(228,148,42,.16); }
.capacity-status.low-headroom strong { color: #ffd58b; }
.existing-pipe-status { margin-top: .8rem; padding: .65rem .75rem; border-left: 3px solid #76d9d2; color: #d4ebec; background: rgba(255,255,255,.08); font-size: .72rem; line-height: 1.5; }
.existing-pipe-status strong { display: block; margin-bottom: .15rem; color: #b2f1e9; }
.existing-pipe-status.does-not-pass { border-left-color: #f3bd64; background: rgba(228,148,42,.16); }
.existing-pipe-status.does-not-pass strong { color: #ffd58b; }
.metric-grid { grid-template-columns: repeat(5, 1fr); gap: .75rem; padding: 1.2rem 1.5rem; border: 0; border-radius: 0; background: #fff; }
.metric-grid article { min-height: 6.5rem; padding: .85rem; border: 1px solid #dbe8eb; border-radius: 8px; background: #fbfdfd; }
.metric-grid span { color: #54717e; }
.metric-grid strong { color: var(--navy); }
.result-note, .math-details { margin-right: 1.5rem; margin-left: 1.5rem; }
.result-note { margin-bottom: 1rem; }
.math-details { margin-bottom: 1.5rem; }
.capacity-wrap { margin-top: 1.2rem; }
.capacity-wrap table { min-width: 0; }
.capacity-wrap caption { padding: .9rem 1rem; color: var(--navy); background: #f5fafb; font-size: .78rem; font-weight: 700; text-align: left; }
.capacity-wrap .selected-capacity th, .capacity-wrap .selected-capacity td { color: #075c58; background: #e7f8f5; font-weight: 700; }
.selected-label { margin-left: .4rem; padding: .14rem .35rem; border-radius: 99px; color: #076157; background: #ccefe9; font-size: .59rem; letter-spacing: .05em; text-transform: uppercase; }
.content-section { margin-top: 4rem; }
.content-section h2 { margin: 0 0 1rem; color: var(--navy); font-size: clamp(1.6rem, 3vw, 2.35rem); line-height: 1.2; letter-spacing: -.04em; }
.content-section > p { max-width: 800px; color: #526f7e; font-size: .94rem; line-height: 1.7; }
.content-section .eyebrow { margin-bottom: .45rem; color: var(--blue); font-size: .74rem; font-weight: 700; letter-spacing: .13em; line-height: 1.35; text-transform: uppercase; }
.step-grid { display: grid; grid-template-columns: 1fr; }
.step-grid article { display: grid; grid-template-columns: 2.15rem minmax(0, 1fr); column-gap: .8rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.step-grid article:first-child { padding-top: .25rem; }
.step-grid article:last-child { padding-bottom: 0; border-bottom: 0; }
.step-grid span { grid-row: span 2; display: inline-grid; width: 2.15rem; height: 2.15rem; place-items: center; color: var(--blue); background: #e8f8f6; border-radius: 50%; font-size: .68rem; font-weight: 700; letter-spacing: .08em; }
.step-grid h3 { margin: .1rem 0 .4rem; color: var(--navy); font-size: .96rem; }
.step-grid p { margin: 0; color: #526f7e; font-size: .82rem; line-height: 1.6; }
.example-calculation { margin: 1.35rem 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.worked-example-illustration { margin: 1.25rem 0 1.35rem; }
.worked-example-illustration img { display: block; width: 100%; height: auto; border: 1px solid #dbe8eb; border-radius: 8px; }
.worked-example-illustration figcaption { margin-top: .45rem; color: #617c88; font-size: .76rem; line-height: 1.5; }
.multiple-segments-illustration { margin: 1.25rem 0 1.35rem; }
.multiple-segments-illustration img { display: block; width: 100%; height: auto; border: 1px solid #dbe8eb; border-radius: 8px; }
.multiple-segments-illustration figcaption { margin-top: .45rem; color: #617c88; font-size: .76rem; line-height: 1.5; }
.example-calculation li { display: grid; grid-template-columns: 2.15rem minmax(0, 1fr); gap: .8rem; align-items: start; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.example-calculation span { display: inline-grid; width: 2.15rem; height: 2.15rem; place-items: center; border-radius: 50%; color: var(--blue); background: #e8f8f6; font-size: .68rem; font-weight: 700; letter-spacing: .08em; }
.example-calculation p { margin: .25rem 0 0; color: #426474; font-size: .92rem; line-height: 1.65; }
.example-calculation strong { color: var(--navy); }
.page-content .content-section.worked-example-section { margin-top: 4rem; }
.page-content .content-section#multiple-segments { margin-top: 4rem; }
.page-content .content-section#limits { margin-top: 4rem; }
.page-content .content-section#faqs { margin-top: 4rem; }
.limits-section { padding: 0; border: 0; background: transparent; }
.section-followup a { color: var(--blue); font-weight: 600; }
.faqs { margin-bottom: 5rem; }
.faq-grid { grid-template-columns: 1fr; gap: .5rem; }
.faq-grid details { overflow: hidden; border: 1px solid #d6e6e8; border-radius: 10px; background: #fff; }
.faq-grid details[open] { border-color: #8bcfca; background: #f7fcfb; }
.faq-grid summary { display: flex; gap: .65rem; align-items: center; min-height: 3.15rem; padding: .55rem .8rem; color: var(--navy); font-size: .82rem; font-weight: 700; line-height: 1.4; list-style: none; cursor: pointer; }
.faq-grid summary::-webkit-details-marker { display: none; }
.faq-grid summary::before { content: "Q"; display: inline-grid; width: 1.85rem; height: 1.85rem; flex: 0 0 1.85rem; place-items: center; border-radius: 50%; color: #008e84; background: #e2f7f4; font-size: .67rem; font-weight: 700; letter-spacing: .02em; }
.faq-grid summary::after { content: "+"; margin-left: auto; color: #008e84; font-size: 1.25rem; font-weight: 500; line-height: 1; }
.faq-grid details[open] summary { padding-bottom: .4rem; }
.faq-grid details[open] summary::after { content: "-"; }
.faq-grid details p { margin: 0; padding: 0 .8rem .8rem 3.25rem; color: #526f7e; font-size: .76rem; line-height: 1.65; }
.print-report { display: none; }
.page-body-layout { display: grid; grid-template-areas: "content sidebar"; grid-template-columns: minmax(0, 1fr) 245px; gap: 3.5rem; align-items: start; width: min(75%, 1050px); margin: 4rem auto 0; padding-bottom: 5rem; }
.page-content { grid-area: content; min-width: 0; }
.page-content .content-section { width: auto; max-width: none; margin: 0; }
.page-content > * + * { margin-top: 2.65rem; }
.page-content .faqs { margin-bottom: 0; }
.page-sidebar { position: sticky; top: 1.5rem; grid-area: sidebar; }
.page-sidebar .page-toc { display: block; width: auto; margin: 0; padding: 1.15rem; border: 1px solid var(--blue); border-radius: 12px; color: #fff; background: var(--blue); }
.toc-intro { padding: .05rem 0 0; }
.page-sidebar .page-toc-label { margin: 0 0 .28rem; color: #fff; font-size: .88rem; font-weight: 700; letter-spacing: -.02em; }
.page-sidebar .toc-intro > p:last-child { margin: 0 0 .9rem; color: #fff; font-size: .68rem; line-height: 1.5; }
.page-sidebar .page-toc ol { display: grid; grid-template-columns: 1fr; gap: .5rem; margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.page-sidebar .page-toc li { min-width: 0; padding: 0; counter-increment: toc; }
.page-sidebar .page-toc li::before { display: none; }
.page-sidebar .page-toc a { display: flex; align-items: center; gap: .6rem; min-height: 2.7rem; padding: .55rem .7rem; border: 0; border-radius: 8px; color: #fff; background: rgba(255,255,255,.1); font-size: .72rem; font-weight: 400; line-height: 1.35; text-decoration: none; }
.page-sidebar .page-toc a::before { content: counter(toc, decimal-leading-zero); display: inline-grid; width: 1.75rem; height: 1.75rem; flex: 0 0 1.75rem; place-items: center; border-radius: 50%; color: #008e84; background: #fff; font-size: .59rem; font-weight: 700; letter-spacing: .04em; }
.page-sidebar .page-toc a:hover, .page-sidebar .page-toc a:focus-visible { color: #fff; background: rgba(255,255,255,.2); }
@media (max-width: 960px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  .page-intro, .calculator-shell, .results-section, .content-section { width: auto; margin-right: .9rem; margin-left: .9rem; }
  .page-intro { padding-top: 1.35rem; }
  .calculator-head { display: block; }
  .calculator-head > p { margin-top: .55rem; text-align: left; }
  .calculator-form { padding: 1.1rem; }
  .calculator-form select { background-position: right .9rem center; }
  .appliance-head { display: none; }
  .appliance-row { grid-template-columns: 1fr 60px auto; }
  .appliance-row .appliance-preset { grid-column: 1 / -1; }
  .appliance-row .compound { grid-column: 1 / 2; }
  .capacity-status { display: block; }
  .capacity-status strong { display: block; margin-bottom: .2rem; white-space: normal; }
  .existing-pipe-status { display: block; }
  .metric-grid { grid-template-columns: 1fr 1fr; padding: .9rem; }
  .result-note, .math-details { margin-right: .9rem; margin-left: .9rem; }
  .step-grid, .faq-grid { grid-template-columns: 1fr; }
  .page-body-layout { grid-template-areas: "sidebar" "content"; grid-template-columns: 1fr; gap: 2.4rem; width: auto; margin: 2.4rem .9rem 0; padding-bottom: 3rem; }
  .page-sidebar { position: static; }
  .page-content .content-section { margin-right: 0; margin-left: 0; }
}

@media print {
  @page { margin: 16mm; }

  body { background: #fff; color: #000; font-size: 10pt; }
  .site-header,
  .page-intro,
  .calculator-shell,
  .page-body-layout,
  .site-footer { display: none !important; }

  main,
  .results-section,
  .results-card,
  .capacity-wrap { display: block !important; width: 100% !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
  .results-section[hidden] { display: none !important; }
  .print-report { display: block; margin-bottom: 1.25rem; }
  .print-report-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: .45rem; border-bottom: 1px solid #80949a; color: #17384c; }
  .print-report-header p { margin: 0; font-weight: 700; }
  .print-report-title { margin: .7rem 0 1rem; color: #0b3150; font-size: 22pt; font-weight: 700; }
  .print-input-summary { padding: .85rem 1rem; border: 1px solid #b9cbd0; border-radius: 7px; }
  .print-input-summary h2 { margin: 0 0 .45rem; color: #0b3150; font-size: 12pt; }
  .print-input-summary dl { display: grid; grid-template-columns: 1fr 1fr; gap: .38rem 1rem; margin: 0; }
  .print-input-summary div { display: grid; grid-template-columns: 45% 1fr; gap: .35rem; }
  .print-input-summary dt { color: #526a74; font-weight: 600; }
  .print-input-summary dd { margin: 0; }
  .result-header { padding: 0 0 .7rem; }
  .result-header .eyebrow,
  .copy-button,
  .math-details { display: none !important; }
  .result-header h2 { font-size: 16pt; }
  .primary-result { padding: .9rem 1rem; color: #000; background: #eef6f5 !important; border: 1px solid #b9d8d3; }
  .primary-result :is(p, .result-label, .result-summary, .capacity-status, .existing-pipe-status) { color: #000 !important; }
  .capacity-status,
  .existing-pipe-status { background: transparent !important; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); padding: .85rem 0; }
  .metric-grid article { min-height: 0; break-inside: avoid; }
  .result-note { margin: 0; }
  .capacity-wrap { margin-top: 1rem !important; border: 1px solid #b9cbd0 !important; }
  .capacity-wrap table { min-width: 0; }
}
