/* ==========================================================================
   Pipe dimensions page (pipe-dimensions.html)

   Design follows new.html: a schedule finder driving a live result read-out
   over the full ASME B36.19 / B36.10 reference table, with a navy ground and
   a red accent. Scoped under .pd so it cannot leak into other pages.
   ========================================================================== */

.pd,
.pd-hero {
  --pd-navy: #06274b;
  --pd-navy2: #0b3a70;
  --pd-red: #df1d2f;
  --pd-green: #13873f;
  --pd-ink: #0d2340;
  --pd-muted: #66788f;
  --pd-line: #dce4ee;
  --pd-soft: #f4f7fb;
  --pd-shadow: 0 12px 32px rgba(6, 39, 75, 0.1);
}

.pd {
  display: block;
  background: #fff;
  color: var(--pd-ink);
  font-size: 15px;
  line-height: 1.45;
}

.pd *,
.pd *::before,
.pd *::after,
.pd-hero *,
.pd-hero *::before,
.pd-hero *::after {
  box-sizing: border-box;
}

/* Headings follow the rest of the site: h2-h6 in Caviar Dreams Bold, which is
   loaded by the @import at the top of css/style.css. h1 stays Trebuchet MS
   because the global h1 rule has its font-family commented out, so every h1 on
   the site inherits the body font. Caviar Dreams ships a single normal weight,
   so heading weights are held at normal throughout these pages — anything
   heavier makes the browser synthesise a fake bold. */
.pd h1,
.pd-hero h1 {
  font-family: "Trebuchet MS", "Segoe UI", Arial, Helvetica, sans-serif;
}

.pd h2,
.pd h3,
.pd h4,
.pd h5,
.pd h6 {
  font-family: "CaviarDreamsBold", Arial, Helvetica, sans-serif;
  font-weight: normal;
}

.pd-wrap {
  width: min(1180px, 92%);
  margin: 0 auto;
}

.pd-section {
  padding: 52px 0;
}

.pd-section--soft {
  background: var(--pd-soft);
}

/* ==========================================================================
   Hero — overlaid on the banner in .wrapper.row5
   ========================================================================== */

.pd-hero {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  /* Clicks pass through to the banner underneath */
  pointer-events: none;
  background: linear-gradient(90deg, rgba(1, 18, 35, 0.93) 0%,
      rgba(1, 22, 43, 0.8) 50%, rgba(1, 22, 43, 0.34) 100%);
  color: #fff;
}

/* .wrapper.row5 * forces max-width:none on every descendant, so the shell
   width has to be reasserted with matching weight. */
.wrapper.row5 .pd-hero__inner {
  width: 92%;
  max-width: 1180px !important;
  margin: 0 auto;
}

.pd-hero__kicker {
  display: inline-block;
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 4px solid var(--pd-red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.wrapper.row5 .pd-hero h1 {
  max-width: 760px;
  margin: 0 0 14px;
  padding: 0;
  color: #fff;
  font-family: "Trebuchet MS", "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -1.2px;
  text-transform: none;
  background: none;
  border: 0;
}

.wrapper.row5 .pd-hero h1 span {
  color: #ed273b;
}

.wrapper.row5 .pd-hero__sub {
  max-width: 660px;
  margin: 0;
  color: #edf4fb;
  font-size: 16px;
  line-height: 1.6;
}

/* Single still, not a slideshow: no prev/next arrows */
.wrapper.row5 .pd-hero-slider .centered-btns_nav,
.wrapper.row5 .pd-hero-slider .rslides_nav {
  display: none !important;
}

/* Match the slider's own offset for the fixed header */
@media screen and (min-width: 1199px) {
  .pd-hero {
    margin-top: 120px;
  }
}

/* On a phone the banner is far shorter than the hero copy, so the overlay
   clipped the kicker and cut the sub-line off mid-sentence. Take the hero out
   of the overlay below this width: it stacks under the banner and grows to
   fit its own content. */
@media screen and (max-width: 900px) {
  .wrapper.row5 .pd-hero-slider .pd-hero {
    position: static;
    display: block;
    padding: 26px 0 30px;
    pointer-events: auto;
    background: var(--pd-navy);
  }
}

/* ==========================================================================
   Feature strip
   ========================================================================== */

.pd-strip {
  background: linear-gradient(90deg, var(--pd-navy2), #123f74);
  color: #fff;
}

.pd-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.pd-feature {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 21px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.pd-feature:last-child {
  border-right: 0;
}

.pd-feature__icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 10px;
  font-size: 19px;
}

.pd-feature b {
  display: block;
  font-size: 14px;
}

.pd-feature span {
  font-size: 12px;
  color: #cfe0f4;
}

/* ==========================================================================
   Section heading
   ========================================================================== */

.pd-head {
  margin-bottom: 25px;
  text-align: center;
}

.pd h2.pd-head__title {
  margin: 0;
  padding: 0;
  color: var(--pd-navy);
  font-size: 30px;
  line-height: 1.2;
  font-weight: normal;
  letter-spacing: -0.4px;
  text-transform: none;
  background: none;
  border: 0;
}

.pd-head p {
  max-width: 760px;
  margin: 8px auto 0;
  color: var(--pd-muted);
}

/* ==========================================================================
   Finder
   ========================================================================== */

.pd-finder {
  padding: 26px;
  background: #fff;
  border: 1px solid var(--pd-line);
  border-radius: 12px;
  box-shadow: var(--pd-shadow);
}

.pd-finder__grid {
  display: grid;
  grid-template-columns: 1.1fr 1.25fr 1.35fr 0.8fr 0.85fr;
  gap: 14px;
  align-items: end;
}

.pd-finder label {
  display: block;
  margin-bottom: 7px;
  color: #203a59;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.pd-finder select,
.pd-seg {
  height: 44px;
  background: #fff;
  border: 1px solid #ccd7e4;
  border-radius: 5px;
}

.pd-finder select {
  width: 100%;
  padding: 0 12px;
  color: #193553;
  font-weight: 700;
}

.pd-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.pd-seg button {
  background: #fff;
  border: 0;
  color: #344d68;
  font-weight: 800;
  cursor: pointer;
}

.pd-seg button.is-active {
  background: var(--pd-red);
  color: #fff;
}

.pd .pd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 19px;
  background: var(--pd-navy2);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.pd .pd-btn:hover,
.pd .pd-btn:focus {
  background: var(--pd-navy);
  color: #fff;
  transform: translateY(-1px);
}

.pd .pd-btn--red {
  background: var(--pd-red);
}

.pd .pd-btn--red:hover,
.pd .pd-btn--red:focus {
  background: #bb1424;
}

.pd .pd-btn--green {
  background: var(--pd-green);
}

.pd .pd-btn--green:hover,
.pd .pd-btn--green:focus {
  background: #0f6e33;
}

.pd .pd-btn i {
  font-size: 14px;
  line-height: 1;
}

.pd-quick {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.pd-quick > span {
  margin-right: 4px;
  font-size: 11px;
  font-weight: 900;
}

.pd-sch {
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #cad5e1;
  border-radius: 4px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pd-sch.is-active {
  background: var(--pd-red);
  border-color: var(--pd-red);
  color: #fff;
}

/* ==========================================================================
   Result read-out
   ========================================================================== */

.pd .pd-result__title {
  margin: 28px 0 14px;
  padding: 0;
  color: var(--pd-navy);
  font-size: 24px;
  font-weight: normal;
  line-height: 1.3;
  text-align: center;
  text-transform: none;
  background: none;
  border: 0;
}

.pd-result__title .pd-red {
  color: var(--pd-red);
}

.pd-metrics {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: #fff;
  border: 1px solid var(--pd-line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 7px 20px rgba(6, 39, 75, 0.07);
}

.pd-metric {
  padding: 18px 8px;
  border-right: 1px solid var(--pd-line);
  text-align: center;
}

.pd-metric:last-child {
  border-right: 0;
}

.pd-metric small {
  display: block;
  margin-bottom: 7px;
  color: #173b62;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.pd-metric strong {
  color: var(--pd-red);
  font-size: 19px;
}

.pd-metric--na strong {
  color: var(--pd-muted);
  font-size: 13px;
}

/* ==========================================================================
   Reference table
   ========================================================================== */

.pd-table-card {
  margin-top: 20px;
  border: 1px solid #d5dfeb;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(6, 39, 75, 0.07);
}

.pd-table-card__title {
  padding: 13px 18px;
  background: linear-gradient(90deg, #07366a, #06274b);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.pd-table-scroll {
  max-height: 690px;
  overflow: auto;
}

.pd table {
  width: 100%;
  min-width: 1460px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.pd thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 9px 7px;
  background: #0a3a70;
  color: #fff;
  border-right: 1px solid #416489;
  border-bottom: 1px solid #416489;
  text-align: center;
  font-weight: 800;
}

.pd thead tr:nth-child(2) th {
  top: 34px;
  background: #12497e;
  font-size: 10.5px;
  font-weight: 700;
}

.pd tbody td {
  padding: 9px 7px;
  background: #fff;
  border-right: 1px solid #e3e9f0;
  border-bottom: 1px solid #e3e9f0;
  text-align: center;
}

.pd tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.pd tbody tr.is-selected td {
  background: #fff7f8;
}

.pd td.pd-key {
  font-weight: 900;
  color: #0f3155;
}

.pd td.pd-hit {
  background: #ec2437 !important;
  color: #fff !important;
  font-weight: 900;
}

.pd td.pd-na {
  color: #9aa7b6;
}

/* Divider between the thickness half and the weight half */
.pd th.pd-split,
.pd td.pd-split {
  border-left: 2px solid #b9c8da;
}

.pd-note {
  margin: 10px 2px 0;
  color: #6b7c91;
  font-size: 12px;
}

.pd-disclaimer {
  margin-top: 18px;
  padding: 12px 14px;
  background: #fff8e8;
  border: 1px solid #f0dca8;
  border-radius: 7px;
  color: #6d5b2b;
  font-size: 12px;
}

/* ==========================================================================
   Explain — pipe diagram, formulas and definitions
   ========================================================================== */

.pd-explain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border: 1px solid var(--pd-line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--pd-shadow);
}

.pd-explain {
  padding: 29px;
}

.pd-explain + .pd-explain {
  border-left: 1px solid var(--pd-line);
}

.pd .pd-explain h3 {
  margin: 0 0 18px;
  padding: 0;
  color: var(--pd-navy);
  font-size: 20px;
  text-transform: none;
  background: none;
  border: 0;
}

.pd-diagram {
  position: relative;
  display: grid;
  place-items: center;
  height: 210px;
  margin-bottom: 15px;
}

.pd-pipe {
  position: relative;
  width: 300px;
  height: 126px;
  background: linear-gradient(180deg, #eef3f7, #8c9eae 24%, #dfe6ec 45%,
      #778b9c 72%, #d9e1e7);
  border-radius: 63px 0 0 63px;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.22);
}

/* The open end of the pipe, drawn rather than shipped as an image */
.pd-pipe::after {
  content: "";
  position: absolute;
  top: 0;
  right: -62px;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #535d65 0 41%,
      #c5d0d8 42% 51%, #778a9a 52% 63%, #dce4ea 64%);
  box-shadow: 0 0 0 1px #8999a7;
}

.pd-od-line,
.pd-id-line {
  position: absolute;
  right: 15px;
  border-right: 2px dashed var(--pd-red);
}

.pd-od-line {
  top: 28px;
  height: 156px;
}

.pd-id-line {
  top: 66px;
  right: 54px;
  height: 82px;
}

.pd-od-label,
.pd-id-label {
  position: absolute;
  color: #11375d;
  font-weight: 900;
}

.pd-od-label {
  top: 94px;
  right: -14px;
}

.pd-id-label {
  top: 94px;
  right: 74px;
}

.pd-t-label {
  position: absolute;
  top: 42px;
  right: 25px;
  color: var(--pd-red);
  font-weight: 900;
}

.pd-formula {
  display: inline-block;
  margin: 7px 6px 0 0;
  padding: 10px 15px;
  background: #fff6f7;
  border: 1px solid #ff7a88;
  border-radius: 5px;
  color: #cf1b2d;
  font-weight: 900;
  font-size: 13px;
}

.pd-bullets {
  display: grid;
  gap: 16px;
}

.pd-bullet {
  display: flex;
  gap: 13px;
}

.pd-bullet i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid #a7bad0;
  border-radius: 50%;
  color: #0d3b6b;
  font-style: normal;
  font-weight: 900;
  font-size: 12px;
}

.pd-bullet b {
  display: block;
  color: #163c63;
  font-size: 14px;
}

.pd-bullet p {
  margin: 2px 0 0;
  color: #526982;
  font-size: 13px;
}

/* ==========================================================================
   Standards and enquiry
   ========================================================================== */

.pd-standards-cta {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 18px;
}

.pd-standards {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--pd-line);
  border-radius: 10px;
}

.pd .pd-standards h3,
.pd .pd-cta h3 {
  margin: 0 0 18px;
  padding: 0;
  color: var(--pd-navy);
  font-size: 20px;
  text-transform: none;
  background: none;
  border: 0;
}

.pd-standard-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.pd-standard-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
}

.pd-stamp {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 2px solid #0e4b80;
  border-radius: 50%;
  color: #0e4b80;
  font-size: 11px;
  font-weight: 900;
}

.pd-standard-card b {
  display: block;
  color: #163c63;
}

.pd-standard-card p {
  margin: 4px 0 0;
  color: var(--pd-muted);
  font-size: 12px;
}

.pd-cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  background: linear-gradient(135deg, #0b3e73, #06274b);
  border-radius: 10px;
  color: #fff;
  text-align: center;
}

.pd .pd-cta h3 {
  margin-bottom: 7px;
  color: #fff;
}

.pd-cta p {
  margin: 0 0 17px;
  color: #dbe9f8;
  font-size: 13px;
}

.pd-cta .pd-btn {
  width: 100%;
  margin-top: 9px;
}

/* ==========================================================================
   Reference prose and FAQs
   ========================================================================== */

.pd-prose {
  max-width: 900px;
  margin: 0 auto;
}

.pd .pd-prose h3 {
  margin: 26px 0 10px;
  padding: 0;
  color: var(--pd-navy);
  font-size: 19px;
  text-transform: none;
  background: none;
  border: 0;
}

.pd-prose p,
.pd-prose li {
  color: #4c6178;
  font-size: 14.5px;
  line-height: 1.75;
}

.pd-prose ol,
.pd-prose ul {
  margin: 0 0 6px;
  padding-left: 20px;
}

.pd-prose li {
  margin-bottom: 7px;
}

.pd-prose strong {
  color: #163c63;
}

.pd-faqs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

.pd details {
  background: #fff;
  border: 1px solid var(--pd-line);
  border-radius: 7px;
}

.pd summary {
  position: relative;
  padding: 15px 46px 15px 16px;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.pd summary::-webkit-details-marker {
  display: none;
}

.pd summary::after {
  content: "+";
  position: absolute;
  top: 11px;
  right: 16px;
  color: var(--pd-navy2);
  font-size: 20px;
}

.pd details[open] summary::after {
  content: "\2013";
}

.pd details p {
  margin: 0;
  padding: 0 16px 16px;
  color: #62758b;
  font-size: 13px;
  line-height: 1.7;
}

/* ==========================================================================
   Closing strip
   ========================================================================== */

.pd-project {
  padding: 25px 0;
  background: linear-gradient(90deg, #093e75, #052b53);
  color: #fff;
}

.pd-project__inner {
  display: grid;
  grid-template-columns: 1.6fr auto auto;
  gap: 22px;
  align-items: center;
}

.pd .pd-project h3 {
  margin: 0;
  padding: 0;
  color: #fff;
  font-size: 21px;
  text-transform: none;
  background: none;
  border: 0;
}

.pd-project p {
  margin: 3px 0 0;
  color: #d9e7f5;
  font-size: 13px;
}

.pd .pd-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.pd .pd-chip:hover {
  color: #ffb8bf;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media screen and (max-width: 1000px) {
  .pd-features {
    grid-template-columns: 1fr 1fr;
  }

  .pd-feature:nth-child(2) {
    border-right: 0;
  }

  .pd-finder__grid {
    grid-template-columns: 1fr 1fr;
  }

  .pd-metrics {
    grid-template-columns: repeat(3, 1fr);
  }

  .pd-metric:nth-child(3) {
    border-right: 0;
  }

  .pd-metric:nth-child(-n + 3) {
    border-bottom: 1px solid var(--pd-line);
  }

  .pd-explain-grid,
  .pd-standards-cta {
    grid-template-columns: 1fr;
  }

  .pd-explain + .pd-explain {
    border-left: 0;
    border-top: 1px solid var(--pd-line);
  }

  .pd-project__inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (max-width: 650px) {
  .pd-section {
    padding: 38px 0;
  }

  .pd-features {
    grid-template-columns: 1fr;
  }

  .pd-feature {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .pd-finder {
    padding: 18px;
  }

  .pd-finder__grid {
    grid-template-columns: 1fr;
  }

  .pd-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .pd-metric:nth-child(2n) {
    border-right: 0;
  }

  .pd-metric {
    border-bottom: 1px solid var(--pd-line);
  }

  .pd-metric:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .pd .pd-result__title {
    font-size: 19px;
  }

  .pd-faqs {
    grid-template-columns: 1fr;
  }

  .pd-project__inner {
    grid-template-columns: 1fr;
  }

  .pd-pipe {
    transform: scale(0.82);
  }
}

/* The table is the point of the page; let it print in full */
@media print {
  .pd-hero,
  .pd-strip,
  .pd-finder,
  .pd-project,
  .pd-cta,
  .pd-faqs {
    display: none !important;
  }

  .pd-section {
    padding: 10px 0;
  }

  .pd-table-scroll {
    max-height: none;
    overflow: visible;
  }

  .pd table {
    min-width: 0;
    font-size: 8px;
  }

  .pd thead th {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd .pd-btn,
  .pd-sch {
    transition: none !important;
  }

  .pd .pd-btn:hover {
    transform: none;
  }
}
