/*
 * templates.css — free IT policy & plan template library (/templates/).
 * Loaded only on template pages, after custom.css. Uses brand tokens from custom.css.
 */

/* ---- Hub ------------------------------------------------------------- */
.tpl-sub-h{ font-size:26px; line-height:1.25; margin:0 0 16px; }
.tpl-list li{ margin-bottom:.6em; }
.tpl-howto{ background:var(--pit-surface); border:1px solid var(--pit-border); border-radius:14px; padding:22px 24px; }
.tpl-howto h3{ font-size:19px; margin:0 0 10px; }
.tpl-howto ol{ margin:0 0 0 1.2em; padding:0; }
.tpl-howto li{ margin-bottom:.45em; }
.tpl-group{ margin-bottom:26px; }
.tpl-group-h{ font-size:28px; margin:0 0 6px; }
.tpl-group-blurb{ color:#5b6573; margin:0 0 22px; max-width:720px; }
.tpl-card h3 a{ color:var(--pit-ink); }
.tpl-card h3 a:hover{ color:var(--pit-primary); }
.tpl-card-chip{ align-self:flex-start; margin-bottom:10px; }
.tpl-card-meta{ font-size:13px; color:#5F6B7A !important; margin-bottom:16px !important; }

/* ---- Template page: hero + intro ----------------------------------- */
.tpl-hero-cta{ display:flex; flex-wrap:wrap; gap:10px; margin-top:10px; }
.tpl-hero-cta .btn{ margin:0; }
.tpl-hero-meta{ margin:14px 0 0; font-size:13px; color:rgba(255,255,255,.75); }
.tpl-includes{ background:var(--pit-surface); border:1px solid var(--pit-border); border-radius:14px; padding:22px 24px; margin-bottom:10px; }
.tpl-includes h3{ font-size:19px; margin:0 0 12px; }
.tpl-includes ul{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:1fr 1fr; gap:8px 26px; }
.tpl-includes li{ position:relative; padding-left:24px; font-size:15px; }
.tpl-includes li i{ position:absolute; left:0; top:4px; color:var(--pit-accent); }
@media (max-width:767.98px){ .tpl-includes ul{ grid-template-columns:1fr; } }

/* ---- Layout: document column + sticky panel -------------------------- */
/* The theme sets section{overflow:hidden}, which breaks position:sticky. */
section.tpl-main{ overflow:visible; }
.tpl-preview-label{ font-size:14px; color:#5b6573; margin:0 0 12px; }
.tpl-panel-col{ margin-bottom:30px; }
.tpl-panel{
  position:sticky; top:100px;
  max-height:calc(100vh - 120px); max-height:calc(100dvh - 120px); overflow:auto; overscroll-behavior:contain;
  background:#fff; border:1px solid var(--pit-border); border-radius:14px;
  padding:22px 20px; box-shadow:0 6px 24px rgba(16,32,64,.06);
}
.tpl-panel-h{ font-size:20px; margin:0 0 6px; }
.tpl-panel-h i{ color:var(--pit-accent); margin-right:4px; }
.tpl-panel-note{ font-size:14px; color:#5b6573; margin:0 0 14px; }
.tpl-panel-note.tpl-small{ font-size:12.5px; margin:12px 0 0; }
.tpl-panel .tool-field{ margin-bottom:12px; }
.tpl-panel .tool-field > label{ font-size:13px; margin-bottom:4px; }
.tpl-panel .tool-field .form-control{ max-width:none; height:40px; font-size:15px; border-radius:8px; }
.tpl-field-count{ font-size:13px; color:#5F6B7A; margin:4px 0 14px; }
.tpl-linkbtn{ background:none; border:0; padding:0; color:var(--pit-primary); text-decoration:underline; cursor:pointer; font-size:13px; }
.tpl-dl .btn{ margin:0 0 8px; white-space:normal; }
/* Stacked full-width buttons: cancel the theme's `.btn + .btn{margin-left:4px}`
   (0,4,0), which pushed the 2nd and 3rd buttons 4px right of the first. */
.tpl-panel .tpl-dl .btn:not(.close) + .btn{ margin-left:0; }
/* Desktop: the panel scrolls inside itself (and "More fields" opens by default),
   so the download buttons stay pinned to its bottom edge instead of sitting
   ~1,200px down, out of sight. */
@media (min-width:992px){
  .tpl-panel .tpl-dl{
    position:sticky; bottom:-22px; z-index:2;
    margin:0 -20px; padding:12px 20px 6px;
    background:#fff; border-top:1px solid var(--pit-border);
    box-shadow:0 -12px 16px -14px rgba(16,32,64,.22);
  }
}
.tpl-more{ margin:0 0 6px; border-top:1px solid var(--pit-border); }
.tpl-more > summary{ cursor:pointer; font-size:14px; font-weight:700; color:var(--pit-primary); padding:12px 0; }
.tpl-more > summary .tpl-more-n{ font-weight:400; color:#5F6B7A; }
.tpl-more[open] > summary{ margin-bottom:4px; }
/* Mobile: floating jump back to the Customize panel while reading the document. */
.tpl-jump{ display:none; }
@media (max-width:991.98px){
  .tpl-jump:not([hidden]){
    display:inline-flex; align-items:center; gap:8px; position:fixed; left:16px; bottom:16px; z-index:50;
    background:var(--pit-primary); color:#fff; font-size:14px; font-weight:700; padding:10px 16px; min-height:44px;
    border-radius:999px; box-shadow:0 6px 18px rgba(16,32,64,.25);
  }
  .tpl-jump:hover, .tpl-jump:focus{ color:#fff; }
}
.tpl-dl .btn i{ margin-right:6px; }
@media (max-width:991.98px){
  .tpl-main .row{ display:flex; flex-direction:column; }
  .tpl-panel-col{ order:-1; }
  .tpl-panel{ position:static; max-height:none; }
  .tpl-fields{ display:grid; grid-template-columns:1fr 1fr; gap:0 14px; }
}
@media (max-width:575.98px){ .tpl-fields{ grid-template-columns:1fr; } }

/* ---- The document itself ------------------------------------------- */
.tpl-doc{
  background:#fff; border:1px solid var(--pit-border); border-radius:14px;
  padding:44px 48px; box-shadow:0 6px 24px rgba(16,32,64,.06);
  font-size:16px; line-height:1.65; color:#2b3240;
}
.tpl-doc-head{ border-bottom:3px solid var(--pit-primary); padding-bottom:22px; margin-bottom:28px; }
.tpl-doc-org{ font-size:14px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--pit-primary); margin:0 0 4px; }
.tpl-doc-title{ font-size:32px; line-height:1.2; margin:0 0 18px; color:var(--pit-ink); }
.tpl-doc .tpl-h2{ font-size:22px; line-height:1.3; margin:34px 0 12px; color:var(--pit-anchor); scroll-margin-top:110px; }
.tpl-doc .tpl-h3{ font-size:17px; margin:22px 0 8px; color:var(--pit-ink); font-weight:700; }
/* Document sections must not inherit the theme's section{padding:80px 0; overflow:hidden}. */
.tpl-doc section{ scroll-margin-top:110px; padding:0 0 8px; overflow:visible; background:none; }
.tpl-doc p{ margin:0 0 12px; }
.tpl-doc ul, .tpl-doc ol{ margin:0 0 14px 1.3em; padding:0; }
.tpl-doc li{ margin-bottom:6px; }
.tpl-doc ul.tpl-check{ list-style:none; margin-left:0; }
.tpl-doc ul.tpl-check li{ padding-left:26px; text-indent:-26px; }
.tpl-box{ display:inline-block; width:20px; text-indent:0; color:var(--pit-anchor); font-size:17px; }
.tpl-note{
  background:#fff8e6; border-left:4px solid var(--pit-warn); border-radius:0 8px 8px 0;
  padding:10px 14px; font-size:14px; color:#5a4a1e;
}
.tpl-table-wrap{ overflow-x:auto; margin:0 0 16px; -webkit-overflow-scrolling:touch; }
.tpl-table{ width:100%; border-collapse:collapse; font-size:14px; line-height:1.45; }
.tpl-table th, .tpl-table td{ border:1px solid #d5dbe3; padding:8px 10px; text-align:left; vertical-align:top; }
.tpl-table thead th{ background:#eaf2fa; color:var(--pit-anchor); font-weight:700; }
.tpl-table td{ min-width:90px; }
.tpl-control{ margin:0; }
.tpl-control th{ width:32%; background:var(--pit-surface); color:var(--pit-anchor); font-weight:600; }
.tpl-sign td{ height:58px; vertical-align:bottom; }
.tpl-line{ display:inline-block; min-width:120px; border-bottom:1px solid #8a93a0; margin-left:6px; height:1em; }
.tpl-sign-line{ width:42%; }
.tpl-sign-date{ width:22%; }
.tpl-doc-foot{ margin:30px 0 0; padding-top:14px; border-top:1px solid var(--pit-border); font-size:12.5px; color:#5F6B7A; }

/* Placeholders: unfilled = highlighted, filled = subtle underline on screen. */
.tpl-ph{ background:#fff1b8; border-radius:3px; padding:0 3px; color:#5a4a1e; font-weight:600; }
.tpl-ph.is-filled{ background:rgba(0,184,248,.16); color:var(--pit-ink); font-weight:inherit; }
.tpl-ph-demo{ font-weight:600; }

@media (max-width:767.98px){
  .tpl-doc{ padding:24px 18px; font-size:16px; border-radius:10px; }
  .tpl-doc-title{ font-size:25px; }
  .tpl-doc .tpl-h2{ font-size:19px; }
  .tpl-table{ font-size:13px; }
  .tpl-sign td{ display:block; width:auto; height:auto; border-top:0; padding:10px; }
  .tpl-sign tr td:first-child{ border-top:1px solid #d5dbe3; }
}

/* ---- FAQ + related ------------------------------------------------- */
.tpl-faq details{ background:#fff; border:1px solid var(--pit-border); border-radius:12px; margin-bottom:12px; padding:0 20px; }
.tpl-faq summary{ cursor:pointer; font-weight:700; padding:16px 0; color:var(--pit-ink); list-style-position:outside; }
.tpl-faq details[open] summary{ color:var(--pit-primary); }
.tpl-faq details p{ margin:0 0 16px; color:#39424f; }
.tpl-rel-h{ font-size:19px; margin:0 0 12px; }
.tpl-rel-list{ list-style:none; margin:0; padding:0; }
.tpl-rel-list li{ border-top:1px solid var(--pit-border); }
.tpl-rel-list li:last-child{ border-bottom:1px solid var(--pit-border); }
.tpl-rel-list a{ display:block; padding:11px 2px; color:var(--pit-ink); }
.tpl-rel-list a:hover{ color:var(--pit-primary); }

/* ---- Lead form inside the blue CTA box ----------------------------- */
.tpl-lead{ max-width:860px; text-align:left; }
.tpl-lead h3, .tpl-lead > p{ text-align:center; }
.tpl-lead-form label{ color:#fff; font-weight:600; font-size:14px; }
.tpl-lead-form .form-control{ background:#fff; color:var(--pit-ink); border:0; border-radius:8px; }
.tpl-lead-form select.form-control{ height:auto; min-height:44px; }
.tpl-lead-choice{ display:flex; flex-wrap:wrap; gap:8px 24px; border:0; padding:0; }
.tpl-lead-choice label{ font-weight:500; display:inline-flex; align-items:center; gap:8px; margin:0; }
.tpl-optional{ font-weight:400; opacity:.8; }
.tpl-lead-form .btn{ margin:0; }
.tpl-lead-privacy{ font-size:13px; margin:14px 0 0 !important; color:rgba(255,255,255,.85) !important; }
.tpl-lead-privacy a{ color:#fff; text-decoration:underline; }
@media (max-width:575.98px){ .post-cta.tpl-lead{ padding:26px 18px; } }

/* ---- Print / Save as PDF: only the document ------------------------ */
@media print{
  @page{ margin:18mm 16mm; }
  #header, #footer, #scrollTop, .tpl-noprint, .breadcrumb-bar, .page-hero{ display:none !important; }
  body, .body-inner, .tpl-main{ background:#fff !important; }
  .tpl-main{ padding:0 !important; }
  .tpl-main .container{ max-width:none !important; width:auto !important; padding:0 !important; }
  .tpl-main .row{ display:block !important; margin:0 !important; }
  .tpl-doc-col{ max-width:none !important; flex:none !important; width:auto !important; padding:0 !important; }
  .tpl-doc{ border:0 !important; box-shadow:none !important; padding:0 !important; font-size:11pt; color:#000; }
  .tpl-doc section{ padding:0 0 4pt !important; overflow:visible !important; }
  .tpl-doc-title{ font-size:22pt; }
  .tpl-doc .tpl-h2{ font-size:14pt; page-break-after:avoid; break-after:avoid; }
  .tpl-doc .tpl-h3{ font-size:12pt; page-break-after:avoid; break-after:avoid; }
  .tpl-table{ font-size:9.5pt; }
  .tpl-table tr, .tpl-note, .tpl-sign{ page-break-inside:avoid; break-inside:avoid; }
  .tpl-table-wrap{ overflow:visible; }
  .tpl-ph, .tpl-ph.is-filled{ background:none !important; color:#000 !important; padding:0; font-weight:inherit; }
  .tpl-ph:not(.is-filled){ background:#fff1b8 !important; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  .tpl-table thead th{ -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  a[href]:after{ content:none !important; }
}

/* Drafting notes toggle */
.tpl-opt{ display:flex; align-items:center; gap:8px; font-size:14px; font-weight:600; margin:0 0 14px; cursor:pointer; }
.tpl-doc.tpl-hide-notes .tpl-note{ display:none; }

/* Outline buttons on light backgrounds (Customize panel, hub "Contact us").
   The theme's `.btn:not(.close):not(.mfp-close).btn-light.btn-outline` (white
   text + border) out-specifies the brand-blue default in custom.css, so restate
   it here with enough specificity. */
.tpl-on-light .btn.btn-light.btn-outline:not(.close):not(.mfp-close){ color:var(--pit-primary); border-color:var(--pit-primary); background-color:transparent; }
.tpl-on-light .btn.btn-light.btn-outline:not(.close):not(.mfp-close) span{ color:var(--pit-primary); }
.tpl-on-light .btn.btn-light.btn-outline:not(.close):not(.mfp-close):hover,
.tpl-on-light .btn.btn-light.btn-outline:not(.close):not(.mfp-close):focus{ color:#fff; background-color:var(--pit-primary); border-color:var(--pit-primary); }
.tpl-on-light .btn.btn-light.btn-outline:not(.close):not(.mfp-close):hover span,
.tpl-on-light .btn.btn-light.btn-outline:not(.close):not(.mfp-close):focus span{ color:#fff; }
#tpl-panel{ scroll-margin-top:90px; }
