/* =========================================================
   ROOF PITCH CALCULATOR - SINGLE GUIDE FRAMEWORK
   Loaded only on child pages under /guides/
   ========================================================= */

.rpc-guide-page{
  --rpc-blue:#1F386E;
  --rpc-blue-dark:#162A54;
  --rpc-pink:#CC3366;
  --rpc-soft:#EEF3FF;
  --rpc-soft-2:#F8FAFD;
  --rpc-text:#182033;
  --rpc-muted:#667085;
  --rpc-line:#DDE4EF;
  --rpc-green:#16805B;
  --rpc-green-bg:#EAF7F1;
  --rpc-amber:#9A6700;
  --rpc-amber-bg:#FFF7DD;
}

.rpc-guide-page .rpc-guide,
.rpc-guide-page .rpc-guide *{
  box-sizing:border-box;
}

.rpc-guide-page .rpc-guide{
  width:100%;
  color:var(--rpc-text);
  font-family:inherit;
  background:#fff;
}

.rpc-guide-page .rpc-guide a{
  text-decoration:none;
}

.rpc-guide-wrap{
  width:min(1180px,calc(100% - 36px));
  margin:0 auto;
}

/* ---------- BREADCRUMBS ---------- */

.rpc-guide-breadcrumbs{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px;
  padding:18px 0 0;
  color:#7C879B;
  font-size:12px;
  line-height:1.5;
}

.rpc-guide-breadcrumbs a{
  color:#65728A;
}

.rpc-guide-breadcrumbs a:hover{
  color:var(--rpc-blue);
}

.rpc-guide-breadcrumbs .rpc-sep{
  color:#A7B0BF;
}

/* ---------- ARTICLE HEADER ---------- */

.rpc-guide-header{
  padding:48px 0 42px;
  border-bottom:1px solid var(--rpc-line);
  background:
    radial-gradient(circle at 88% 12%,rgba(204,51,102,.07),transparent 25%),
    linear-gradient(180deg,#FBFCFF 0%,#F4F7FC 100%);
}

.rpc-guide-header-inner{
  max-width:920px;
}

.rpc-guide-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:14px;
  color:var(--rpc-pink);
  font-size:11px;
  font-weight:850;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.rpc-guide-kicker::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--rpc-pink);
}

.rpc-guide-header h1{
  margin:0 0 18px;
  color:var(--rpc-blue);
  font-size:clamp(38px,5vw,60px);
  line-height:1.04;
  letter-spacing:-.04em;
  font-weight:850;
}

.rpc-guide-lead{
  max-width:860px;
  margin:0;
  color:#536077;
  font-size:17px;
  line-height:1.78;
}

.rpc-guide-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px 18px;
  margin-top:22px;
  padding-top:18px;
  border-top:1px solid #D9E1EE;
  color:#667085;
  font-size:12px;
  line-height:1.5;
}

.rpc-guide-meta-item{
  display:inline-flex;
  align-items:center;
  gap:7px;
}

.rpc-guide-meta strong{
  color:var(--rpc-blue);
  font-weight:800;
}

.rpc-guide-meta a{
  color:var(--rpc-blue);
  font-weight:800;
}

.rpc-guide-meta a:hover{
  color:var(--rpc-pink);
}

.rpc-guide-meta-dot{
  width:4px;
  height:4px;
  border-radius:50%;
  background:#BCC5D2;
}

.rpc-guide-actions{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:20px;
}

.rpc-guide-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:43px;
  padding:10px 14px;
  border:1px solid transparent;
  border-radius:12px;
  font-size:12.5px;
  line-height:1;
  font-weight:850;
  cursor:pointer;
  transition:.18s ease;
}

.rpc-guide-btn-primary{
  background:var(--rpc-blue);
  color:#fff;
}

.rpc-guide-btn-primary:hover{
  background:var(--rpc-blue-dark);
  transform:translateY(-1px);
}

.rpc-guide-btn-secondary{
  border-color:#CDD7E7;
  background:#fff;
  color:var(--rpc-blue);
}

.rpc-guide-btn-secondary:hover{
  background:var(--rpc-soft);
}

/* ---------- MOBILE TOC ---------- */

.rpc-guide-mobile-toc{
  display:none;
  margin-top:22px;
  border:1px solid var(--rpc-line);
  border-radius:14px;
  background:#fff;
}

.rpc-guide-mobile-toc summary{
  list-style:none;
  padding:13px 15px;
  color:var(--rpc-blue);
  font-size:13px;
  font-weight:850;
  cursor:pointer;
}

.rpc-guide-mobile-toc summary::-webkit-details-marker{
  display:none;
}

.rpc-guide-mobile-toc summary::after{
  content:"+";
  float:right;
  color:var(--rpc-pink);
  font-size:17px;
  line-height:1;
}

.rpc-guide-mobile-toc[open] summary::after{
  content:"−";
}

.rpc-guide-mobile-toc .rpc-guide-toc-list{
  padding:0 15px 14px;
}

/* ---------- MAIN ARTICLE LAYOUT ---------- */

.rpc-guide-body{
  padding:48px 0 72px;
}

.rpc-guide-layout{
  display:grid;
  grid-template-columns:minmax(0,800px) minmax(220px,280px);
  gap:54px;
  align-items:start;
  justify-content:space-between;
}

.rpc-guide-content{
  min-width:0;
}

.rpc-guide-content > :first-child{
  margin-top:0;
}

.rpc-guide-content h2{
  scroll-margin-top:110px;
  margin:54px 0 15px;
  color:var(--rpc-blue);
  font-size:clamp(27px,3vw,34px);
  line-height:1.18;
  letter-spacing:-.025em;
  font-weight:850;
}

.rpc-guide-content h3{
  scroll-margin-top:110px;
  margin:31px 0 11px;
  color:var(--rpc-blue);
  font-size:20px;
  line-height:1.3;
  letter-spacing:-.012em;
  font-weight:800;
}

.rpc-guide-content p{
  margin:0 0 18px;
  color:#39455B;
  font-size:16px;
  line-height:1.78;
}

.rpc-guide-content ul,
.rpc-guide-content ol{
  margin:0 0 20px;
  padding-left:22px;
  color:#39455B;
  font-size:16px;
  line-height:1.75;
}

.rpc-guide-content li + li{
  margin-top:6px;
}

.rpc-guide-content a{
  color:var(--rpc-pink);
  font-weight:750;
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}

.rpc-guide-content a:hover{
  color:var(--rpc-blue);
}

.rpc-guide-content strong{
  color:#26334B;
}

/* ---------- SIDEBAR ---------- */

.rpc-guide-sidebar{
  min-width:0;
}

.rpc-guide-sticky{
  position:sticky;
  top:96px;
  display:grid;
  gap:14px;
}

.rpc-guide-sidebar-card{
  padding:17px;
  border:1px solid var(--rpc-line);
  border-radius:17px;
  background:#fff;
  box-shadow:0 10px 30px rgba(31,56,110,.05);
}

.rpc-guide-sidebar-card h2,
.rpc-guide-sidebar-card h3{
  margin:0 0 12px;
  color:var(--rpc-blue);
  font-size:14px;
  line-height:1.3;
  font-weight:850;
}

.rpc-guide-toc-list{
  list-style:none;
  margin:0;
  padding:0;
}

.rpc-guide-toc-list li{
  margin:0;
  padding:0;
}

.rpc-guide-toc-list li + li{
  margin-top:5px;
}

.rpc-guide-toc-list a{
  display:block;
  padding:7px 9px;
  border-radius:8px;
  color:#65728A;
  font-size:12px;
  line-height:1.45;
  font-weight:650;
  transition:.16s ease;
}

.rpc-guide-toc-list a:hover,
.rpc-guide-toc-list a.is-active{
  background:var(--rpc-soft);
  color:var(--rpc-blue);
}

.rpc-guide-toc-list .rpc-toc-h3 a{
  padding-left:20px;
  font-size:11.5px;
}

.rpc-guide-sidebar-cta{
  background:linear-gradient(145deg,var(--rpc-blue),#132B59);
  border-color:transparent;
}

.rpc-guide-sidebar-cta h3{
  color:#fff;
}

.rpc-guide-sidebar-cta p{
  margin:0 0 12px;
  color:#D8E1F1;
  font-size:11.8px;
  line-height:1.6;
}

.rpc-guide-sidebar-cta .rpc-guide-btn{
  width:100%;
  background:#fff;
  color:var(--rpc-blue);
}

.rpc-guide-sidebar-note{
  color:#748198;
  font-size:11px;
  line-height:1.55;
}

/* ---------- QUICK ANSWER / KEY TAKEAWAY ---------- */

.rpc-guide-answer{
  margin:24px 0 28px;
  padding:20px 21px;
  border:1px solid #CCD8EA;
  border-left:4px solid var(--rpc-blue);
  border-radius:16px;
  background:#F7FAFF;
}

.rpc-guide-answer-label{
  display:block;
  margin-bottom:7px;
  color:var(--rpc-pink);
  font-size:10.5px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.rpc-guide-answer p{
  margin:0;
  color:#344157;
  font-size:15px;
  line-height:1.68;
}

/* ---------- TABLES ---------- */

.rpc-guide-table-wrap{
  width:100%;
  margin:22px 0 28px;
  overflow:auto;
  border:1px solid var(--rpc-line);
  border-radius:16px;
  background:#fff;
  -webkit-overflow-scrolling:touch;
}

.rpc-guide-table{
  width:100%;
  min-width:620px;
  border-collapse:collapse;
  border-spacing:0;
  font-size:13.5px;
}

.rpc-guide-table th,
.rpc-guide-table td{
  padding:11px 13px;
  border-bottom:1px solid #E7ECF3;
  text-align:left;
  vertical-align:middle;
  white-space:nowrap;
}

.rpc-guide-table th{
  position:sticky;
  top:0;
  z-index:2;
  background:var(--rpc-blue);
  color:#fff;
  font-size:11px;
  font-weight:850;
  letter-spacing:.03em;
}

.rpc-guide-table tbody tr:nth-child(even){
  background:#FAFBFD;
}

.rpc-guide-table tbody tr:hover{
  background:#F1F5FB;
}

.rpc-guide-table tbody tr:last-child td{
  border-bottom:0;
}

.rpc-guide-table th:first-child,
.rpc-guide-table td:first-child{
  position:sticky;
  left:0;
  z-index:1;
}

.rpc-guide-table td:first-child{
  background:#fff;
  color:var(--rpc-blue);
  font-weight:850;
}

.rpc-guide-table tbody tr:nth-child(even) td:first-child{
  background:#FAFBFD;
}

.rpc-guide-table-note{
  margin:-14px 0 26px;
  color:#7A8497;
  font-size:11.5px;
  line-height:1.55;
}

/* ---------- FORMULAS ---------- */

.rpc-guide-formula{
  margin:19px 0 24px;
  padding:20px;
  border:1px solid #D4DEED;
  border-radius:16px;
  background:linear-gradient(180deg,#FBFCFF,#F3F7FD);
}

.rpc-guide-formula-label{
  display:block;
  margin-bottom:9px;
  color:var(--rpc-blue);
  font-size:11px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.rpc-guide-equation{
  overflow-x:auto;
  color:#152D5D;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(20px,3.1vw,27px);
  line-height:1.45;
  text-align:center;
}

.rpc-guide-equation + .rpc-guide-equation{
  margin-top:10px;
}

.rpc-guide-formula p{
  margin:12px 0 0;
  color:#667085;
  font-size:12.5px;
  line-height:1.6;
}

/* ---------- CALLOUTS ---------- */

.rpc-guide-callout{
  margin:22px 0 26px;
  padding:18px 19px;
  border:1px solid var(--rpc-line);
  border-radius:15px;
  background:#fff;
}

.rpc-guide-callout h3{
  margin:0 0 7px;
  font-size:15px;
}

.rpc-guide-callout p:last-child{
  margin-bottom:0;
}

.rpc-guide-callout-info{
  border-left:4px solid var(--rpc-blue);
  background:#F7FAFF;
}

.rpc-guide-callout-warning{
  border-left:4px solid #D39B20;
  background:var(--rpc-amber-bg);
}

.rpc-guide-callout-success{
  border-left:4px solid var(--rpc-green);
  background:var(--rpc-green-bg);
}

/* ---------- FIGURES / DIAGRAMS ---------- */

.rpc-guide-figure{
  margin:24px 0 28px;
  padding:18px;
  border:1px solid var(--rpc-line);
  border-radius:18px;
  background:#fff;
}

.rpc-guide-figure img,
.rpc-guide-figure svg{
  display:block;
  max-width:100%;
  height:auto;
  margin:0 auto;
}

.rpc-guide-figure figcaption{
  margin-top:12px;
  color:#7A8497;
  font-size:11.5px;
  line-height:1.55;
  text-align:center;
}

/* ---------- QUICK REFERENCE CARDS ---------- */

.rpc-guide-stat-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:22px 0 28px;
}

.rpc-guide-stat{
  padding:17px;
  border:1px solid var(--rpc-line);
  border-radius:15px;
  background:#fff;
}

.rpc-guide-stat strong{
  display:block;
  margin-bottom:5px;
  color:var(--rpc-blue);
  font-size:20px;
  line-height:1.2;
}

.rpc-guide-stat span{
  color:#738096;
  font-size:11.5px;
  line-height:1.45;
}

/* ---------- CALCULATOR CTA ---------- */

.rpc-guide-calculator-cta{
  margin:34px 0;
  padding:26px;
  border-radius:21px;
  background:
    radial-gradient(circle at 92% 15%,rgba(204,51,102,.2),transparent 30%),
    linear-gradient(135deg,var(--rpc-blue),#122850);
  color:#fff;
}

.rpc-guide-calculator-cta .rpc-guide-kicker{
  color:#FFB8D0;
}

.rpc-guide-calculator-cta h2,
.rpc-guide-calculator-cta h3{
  margin:0 0 10px;
  color:#fff;
}

.rpc-guide-calculator-cta p{
  margin:0 0 17px;
  color:#D9E2F1;
  font-size:14px;
  line-height:1.7;
}

.rpc-guide-calculator-cta .rpc-guide-btn{
  background:#fff;
  color:var(--rpc-blue);
  text-decoration:none;
}

/* ---------- SOURCES ---------- */

.rpc-guide-sources{
  margin-top:42px;
  padding-top:26px;
  border-top:1px solid var(--rpc-line);
}

.rpc-guide-sources h2{
  margin-top:0;
}

.rpc-guide-sources ol{
  margin-bottom:0;
  font-size:13px;
  line-height:1.65;
}

/* ---------- AUTHOR BOX ---------- */

.rpc-guide-author{
  display:grid;
  grid-template-columns:72px minmax(0,1fr);
  gap:18px;
  margin-top:44px;
  padding:22px;
  border:1px solid var(--rpc-line);
  border-radius:19px;
  background:#F8FAFD;
}

.rpc-guide-author-photo{
  width:72px;
  height:72px;
  overflow:hidden;
  display:grid;
  place-items:center;
  border-radius:18px;
  background:var(--rpc-blue);
  color:#fff;
  font-size:20px;
  font-weight:900;
}

.rpc-guide-author-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.rpc-guide-author h2,
.rpc-guide-author h3{
  margin:0 0 6px;
  color:var(--rpc-blue);
  font-size:18px;
}

.rpc-guide-author-role{
  display:block;
  margin-bottom:9px;
  color:var(--rpc-pink);
  font-size:11.5px;
  font-weight:850;
}

.rpc-guide-author p{
  margin:0 0 10px;
  color:#667085;
  font-size:12.8px;
  line-height:1.65;
}

.rpc-guide-author a{
  color:var(--rpc-blue);
  font-size:12px;
  font-weight:850;
}

/* ---------- RELATED GUIDES ---------- */

.rpc-guide-related{
  margin-top:42px;
}

.rpc-guide-related > h2{
  margin:0 0 16px;
}

.rpc-guide-related-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:13px;
}

.rpc-guide-related-card{
  display:block;
  padding:17px;
  border:1px solid var(--rpc-line);
  border-radius:15px;
  background:#fff;
  color:inherit;
  transition:.18s ease;
}

.rpc-guide-related-card:hover{
  transform:translateY(-1px);
  border-color:#C5D1E4;
  box-shadow:0 10px 24px rgba(31,56,110,.06);
}

.rpc-guide-related-card span{
  display:block;
  margin-bottom:6px;
  color:var(--rpc-pink);
  font-size:10px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.rpc-guide-related-card strong{
  display:block;
  color:var(--rpc-blue);
  font-size:14px;
  line-height:1.4;
}

/* ---------- CORRECTIONS ---------- */

.rpc-guide-corrections{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-top:40px;
  padding:18px 20px;
  border:1px solid var(--rpc-line);
  border-radius:16px;
  background:#fff;
}

.rpc-guide-corrections strong{
  display:block;
  margin-bottom:3px;
  color:var(--rpc-blue);
  font-size:13px;
}

.rpc-guide-corrections p{
  margin:0;
  color:#7A8497;
  font-size:11.5px;
  line-height:1.55;
}

.rpc-guide-corrections-actions{
  display:flex;
  gap:8px;
  flex:0 0 auto;
}

/* ---------- PRINT ---------- */

@media print{
  body.rpc-guide-page header,
  body.rpc-guide-page footer,
  body.rpc-guide-page .elementor-location-header,
  body.rpc-guide-page .elementor-location-footer,
  body.rpc-guide-page .rpc-guide-sidebar,
  body.rpc-guide-page .rpc-guide-mobile-toc,
  body.rpc-guide-page .rpc-guide-actions,
  body.rpc-guide-page .rpc-guide-calculator-cta,
  body.rpc-guide-page .rpc-guide-related,
  body.rpc-guide-page .rpc-guide-corrections{
    display:none!important;
  }

  body.rpc-guide-page .rpc-guide-wrap{
    width:100%!important;
    max-width:none!important;
  }

  body.rpc-guide-page .rpc-guide-header{
    padding:0 0 18px!important;
    background:#fff!important;
  }

  body.rpc-guide-page .rpc-guide-body{
    padding:20px 0 0!important;
  }

  body.rpc-guide-page .rpc-guide-layout{
    display:block!important;
  }

  body.rpc-guide-page .rpc-guide-content{
    max-width:none!important;
  }

  body.rpc-guide-page .rpc-guide-table-wrap{
    overflow:visible!important;
  }

  body.rpc-guide-page .rpc-guide-table{
    min-width:0!important;
    font-size:9pt!important;
  }

  body.rpc-guide-page .rpc-guide-table th{
    position:static!important;
    background:#eee!important;
    color:#000!important;
  }

  body.rpc-guide-page .rpc-guide-table th:first-child,
  body.rpc-guide-page .rpc-guide-table td:first-child{
    position:static!important;
  }

  body.rpc-guide-page a{
    color:#000!important;
    text-decoration:none!important;
  }
}

/* ---------- RESPONSIVE ---------- */

@media(max-width:980px){
  .rpc-guide-layout{
    grid-template-columns:minmax(0,1fr) 235px;
    gap:32px;
  }

  .rpc-guide-stat-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .rpc-guide-related-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:780px){
  .rpc-guide-wrap{
    width:min(100% - 24px,1180px);
  }

  .rpc-guide-header{
    padding:38px 0 34px;
  }

  .rpc-guide-layout{
    display:block;
  }

  .rpc-guide-sidebar{
    display:none;
  }

  .rpc-guide-mobile-toc{
    display:block;
  }

  .rpc-guide-body{
    padding:38px 0 56px;
  }

  .rpc-guide-content h2{
    margin-top:44px;
  }
}

@media(max-width:540px){
  .rpc-guide-header h1{
    font-size:36px;
  }

  .rpc-guide-lead{
    font-size:15.5px;
  }

  .rpc-guide-meta{
    display:grid;
    gap:8px;
  }

  .rpc-guide-meta-dot{
    display:none;
  }

  .rpc-guide-actions{
    display:grid;
    grid-template-columns:1fr;
  }

  .rpc-guide-btn{
    width:100%;
  }

  .rpc-guide-stat-grid,
  .rpc-guide-related-grid{
    grid-template-columns:1fr;
  }

  .rpc-guide-author{
    grid-template-columns:1fr;
  }

  .rpc-guide-corrections{
    align-items:flex-start;
    flex-direction:column;
  }

  .rpc-guide-corrections-actions{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
  }
}


/* ---------- AUTOMATIC FEATURED IMAGE ---------- */

.rpc-guide-featured-wrap{
  width:min(1180px,calc(100% - 36px));
  margin:30px auto 0;
}

.rpc-guide-featured{
  margin:0;
  overflow:hidden;
  border:1px solid var(--rpc-line);
  border-radius:22px;
  background:#F4F7FC;
  box-shadow:0 16px 40px rgba(31,56,110,.08);
}

.rpc-guide-featured-image{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:16 / 9;
  object-fit:cover;
}

.rpc-guide-featured-slot:empty{
  display:none;
}

@media(max-width:780px){
  .rpc-guide-featured-wrap{
    width:min(100% - 24px,1180px);
    margin-top:22px;
  }

  .rpc-guide-featured{
    border-radius:16px;
  }
}
