/* Current-theme correction for selected live lessons and pages and their authorized draft previews. */
body:is(.crcg-release-preview, .crcg-release-content) .lc-hub .lc-audience-card > img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 20px 20px 0;
}

@media screen {
  body:is(.crcg-release-preview, .crcg-release-content) #content .entry-content a.lc-button {
    color: #fff !important;
  }
  body:is(.crcg-release-preview, .crcg-release-content) #content .entry-content a.lc-button.lc-button-secondary {
    color: #006c8c !important;
  }
  body:is(.crcg-release-preview, .crcg-release-content) #content .entry-content a.lc-button.lc-button-secondary:hover {
    color: #17485e !important;
  }
  body:is(.crcg-release-preview, .crcg-release-content) #content .entry-content .lc-main-page a.lc-button.lc-button-secondary {
    color: #075c77 !important;
  }
  body:is(.crcg-release-preview, .crcg-release-content) #content .entry-content .lc-main-page a.lc-button.lc-button-secondary:hover {
    color: #06445b !important;
  }
}

@media screen and (max-width: 900px) {
  body:is(.crcg-release-preview, .crcg-release-content) #container,
  body:is(.crcg-release-preview, .crcg-release-content) #content {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

/* Review correction: preserve gutters, card padding and a balanced inquiry form. */
body:is(.crcg-release-preview, .crcg-release-content) #container #content .lc-step-strip > li.lc-step {
  padding: 20px;
}
body:is(.crcg-release-preview, .crcg-release-content) #container #content :is(#b03-inquiry, #m02-inquiry, #c05-guide-request) {
  width: 100%;
  max-width: 720px;
  margin: 28px auto;
}
body:is(.crcg-release-preview, .crcg-release-content) :is(#b03-inquiry, #m02-inquiry, #c05-guide-request) .wpcf7,
body:is(.crcg-release-preview, .crcg-release-content) :is(#b03-inquiry, #m02-inquiry, #c05-guide-request) .wpcf7-form,
body:is(.crcg-release-preview, .crcg-release-content) :is(#b03-inquiry, #m02-inquiry, #c05-guide-request) .wpcf7-form label,
body:is(.crcg-release-preview, .crcg-release-content) :is(#b03-inquiry, #m02-inquiry, #c05-guide-request) .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
body:is(.crcg-release-preview, .crcg-release-content) :is(#b03-inquiry, #m02-inquiry, #c05-guide-request) .wpcf7 input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]),
body:is(.crcg-release-preview, .crcg-release-content) :is(#b03-inquiry, #m02-inquiry, #c05-guide-request) .wpcf7 textarea,
body:is(.crcg-release-preview, .crcg-release-content) :is(#b03-inquiry, #m02-inquiry, #c05-guide-request) .wpcf7 select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
body:is(.crcg-release-preview, .crcg-release-content) :is(#b03-inquiry, #m02-inquiry, #c05-guide-request) .wpcf7 input[type=submit] {
  width: auto;
  height: auto;
  min-height: 48px;
  padding: 12px 22px;
  background: #007c9f;
  color: #fff;
  border: 1px solid #007c9f;
  font-weight: 700;
  white-space: normal;
  cursor: pointer;
}
body:is(.crcg-release-preview, .crcg-release-content) :is(#b03-inquiry, #m02-inquiry, #c05-guide-request) .wpcf7 input[type=submit]:hover {
  background: #005e7b;
}
body:is(.crcg-release-preview, .crcg-release-content) :is(#b03-inquiry, #m02-inquiry, #c05-guide-request) .wpcf7 input[type=submit]:focus-visible {
  outline: 3px solid #164c68;
  outline-offset: 3px;
}
@media screen and (max-width: 900px) {
  body:is(.crcg-release-preview, .crcg-release-content) #container #content {
    padding-left: 16px;
    padding-right: 16px;
  }
}
@media screen and (max-width: 640px) {
  body:is(.crcg-release-preview, .crcg-release-content) #container #content .lc-step-strip > li.lc-step {
    padding: 18px;
  }
  body:is(.crcg-release-preview, .crcg-release-content) #container #content :is(#b03-inquiry, #m02-inquiry, #c05-guide-request) {
    padding: 18px;
  }
}
@media screen and (max-width: 480px) {
  body:is(.crcg-release-preview, .crcg-release-content) :is(#b03-inquiry, #m02-inquiry, #c05-guide-request) .wpcf7 input[type=submit] {
    width: 100%;
  }
}

/* Release 0.3.1: fit forms to their content column, including legacy post layouts. */
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-detail[open] .lc-ai-help:not([open]) > summary {
  margin-bottom:0; padding-bottom:0; border-bottom:0;
}
body.crcg-release-content .lc-lesson,
body.crcg-release-preview .lc-lesson { container-type: inline-size; }
body:is(.crcg-release-content,.crcg-release-preview) .lc-lesson [hidden] { display:none!important; }
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-form-grid {
  gap:18px 20px; align-items:start;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-field {
  min-width:0; gap:7px; margin:0;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-field :is(input,select,textarea) {
  box-sizing:border-box; width:100%; max-width:100%; margin:0; line-height:1.45;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-field :is(input,select) {
  height:46px; min-height:46px;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-field textarea {
  height:96px; min-height:96px; resize:vertical;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-field:has(textarea),
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-field.lc-field-wide { grid-column:1 / -1; }
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-field.lc-field-paired { grid-column:auto; }
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-field .lc-hint { margin:0; }
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-status:empty { display:none; }
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-detail > .lc-tool {
  margin:16px 0 0; padding:22px;
}
/* Only inquiry areas inside released content; shared form definitions stay intact. */
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-inquiry {
  clear:both; box-sizing:border-box; width:100%; max-width:760px; margin:28px auto;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-inquiry :is(.wpcf7,.wpcf7-form,.wpcf7-form-control-wrap,label) {
  display:block; box-sizing:border-box; width:100%; max-width:100%; min-width:0;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-inquiry .wpcf7 :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=submit]),select,textarea) {
  box-sizing:border-box; width:100%; max-width:100%; margin:6px 0 12px;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-inquiry .wpcf7 input[type=submit] {
  display:inline-block; width:auto; height:auto; min-height:46px; padding:11px 22px; margin:4px 0 0;
  color:#fff; background:#007c9f; border:1px solid #007c9f; border-radius:5px; font:600 1rem/1.45 Arial,sans-serif; cursor:pointer;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content #c05-guide-request .freeguidebook {
  display:grid; grid-template-columns:150px minmax(0,1fr); gap:18px 26px; align-items:start;
  box-sizing:border-box; float:none; clear:both; width:100%; max-width:none; margin:0; padding:24px;
  background:#f3f9fb; border:1px solid #a4cbd8; border-radius:10px; text-align:left;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content #c05-guide-request .freeguidebook > h2 {
  grid-column:1 / -1; width:auto; margin:0; padding:0; font-size:1.55rem; line-height:1.3; text-align:left;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content #c05-guide-request .freeguidebook > a { grid-column:1; display:block; justify-self:center; }
body:is(.crcg-release-content,.crcg-release-preview) #container #content #c05-guide-request .freeguidebook > a img {
  grid-column:1; width:140px; max-width:100%; height:auto; float:none; margin:6px auto 0; justify-self:center;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-inquiry .wpcf7 .hidden-fields-container,
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-inquiry .wpcf7 input[type=hidden] { display:none!important; }
body:is(.crcg-release-content,.crcg-release-preview) #container #content #c05-guide-request .freeguidebook > .wpcf7 {
  grid-column:2; display:block; width:100%; min-width:0; margin:0; padding:0;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content #c05-guide-request .wpcf7 :is(table,tbody,tr,td) {
  display:block; box-sizing:border-box; width:100%; height:auto; margin:0; padding:0; border:0; background:transparent;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content #c05-guide-request .wpcf7 p { margin:0 0 10px; padding:0; }
body:is(.crcg-release-content,.crcg-release-preview) #container #content #c05-guide-request .wpcf7 input { margin:0; }
@container (max-width:720px) {
  .lc-lesson .lc-form-grid { grid-template-columns:1fr!important; }
  .lc-lesson .lc-field { grid-column:1 / -1!important; }
  .lc-lesson .lc-cols-3 { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@container (max-width:520px) {
  .lc-lesson .lc-cols-2,.lc-lesson .lc-cols-3 { grid-template-columns:1fr; }
  .lc-lesson .lc-tool { padding:18px!important; }
  .lc-lesson .lc-inquiry .freeguidebook { grid-template-columns:1fr!important; padding:20px!important; }
  .lc-lesson .lc-inquiry .freeguidebook > :is(h2,a,.wpcf7) { grid-column:1!important; }
  .lc-lesson .lc-inquiry .freeguidebook > a img { width:110px!important; }
}
@media(max-width:600px) {
  body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-lesson :is(img.alignright,img.alignleft,figure[style*="float"],.lc-inquiry) {
    float:none!important; max-width:100%!important; margin-left:0!important; margin-right:0!important;
  }
  body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-lesson .lc-inquiry input[type=submit] { width:100%; }
}

/* Legacy contact forms use tables for layout. Keep these rules inside inquiry areas. */
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-inquiry .wpcf7 table {
  display:table; table-layout:fixed; border-collapse:separate; border-spacing:0;
  box-sizing:border-box; width:100%; max-width:100%; margin:0; padding:0; border:0; background:transparent;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-inquiry .wpcf7 :is(tbody,tr) {
  height:auto; margin:0; padding:0; border:0; background:transparent;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-inquiry .wpcf7 td {
  box-sizing:border-box; width:auto; height:auto; padding:0 12px 12px 0; border:0; background:transparent; vertical-align:top;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-inquiry .wpcf7 td:last-child { padding-right:0; }
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-inquiry .wpcf7 td p { margin:0; padding:0; }
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-inquiry .wpcf7 table :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select,textarea) {
  margin:0; min-width:0;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-inquiry .wpcf7 table textarea {
  height:140px; min-height:140px; resize:vertical;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content #contact-office { margin:0; padding-top:0; max-width:none; }
body:is(.crcg-release-content,.crcg-release-preview) #container #content #contact-topics { align-self:start; }
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-visual-grid:has(> #contact-office) { align-items:start; }
body:is(.crcg-release-content,.crcg-release-preview) #container #content #estimate-request .timeslot .wpcf7-form-control-wrap {
  display:inline-block; vertical-align:middle; width:130px; margin:0 6px;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content #c05-guide-request .wpcf7 tr {
  padding-bottom:10px!important;
}
body:is(.crcg-release-content,.crcg-release-preview) #container #content #c05-guide-request .wpcf7 tr:last-child { padding-bottom:0!important; }
@container (max-width:640px) {
  body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-inquiry .wpcf7 :is(table,tbody,tr,td) {
    display:block; box-sizing:border-box; float:none; width:100%; max-width:100%; min-width:0;
  }
  body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-inquiry .wpcf7 td { padding:0 0 12px; }
  body:is(.crcg-release-content,.crcg-release-preview) #container #content #estimate-request .timeslot .wpcf7-form-control-wrap {
    display:block; width:100%; margin:6px 0;
  }
}
@media(max-width:600px) {
  body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-inquiry .wpcf7 :is(table,tbody,tr,td) {
    display:block; box-sizing:border-box; float:none; width:100%; max-width:100%; min-width:0;
  }
  body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-inquiry .wpcf7 td { padding:0 0 12px; }
  body:is(.crcg-release-content,.crcg-release-preview) #container #content #estimate-request .timeslot .wpcf7-form-control-wrap {
    display:block; width:100%; margin:6px 0;
  }
}

/* Direct worksheet fields need the same breathing room as grid-based fields. */
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-worksheet > .lc-field + .lc-field {
  margin-top: 18px;
}

body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-worksheet > .lc-field + p {
  margin-top: 14px;
}

/* Hub cards are navigation choices, so hide inherited theme list markers. */
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-lesson-grid > li {
  list-style: none;
  background-image: none;
}

body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-lesson-grid > li::before {
  content: none;
  display: none;
}

/* Supported-company gallery: override the legacy #container #content .companieslogo table/float rules. */
#container #content .lc-main-page ul.lc-logo-gallery {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 0;
}
#container #content .lc-main-page ul.lc-logo-gallery > li {
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: .85rem;
  background: #fff;
}
#container #content .lc-main-page ul.lc-logo-gallery img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 95px;
  margin: 0 auto;
  object-fit: contain;
}
@media (max-width: 560px) {
  #container #content .lc-main-page ul.lc-logo-gallery { gap: .7rem; }
  #container #content .lc-main-page ul.lc-logo-gallery > li { padding: .7rem; }
}

/* Separate adjacent lesson jump links without changing their wording or destinations. */
#container #content .lc-lesson .lc-section-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem 1rem;
  margin: .75rem 0 1.5rem;
  padding: 0;
}
#container #content .lc-lesson .lc-section-nav > a {
  display: inline-block;
  max-width: 100%;
  margin: 0;
  padding: .25rem 0;
  line-height: 1.5;
}

/* Contractor worksheets wrap their fields in a form inside .lc-worksheet. */
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-worksheet > form > .lc-field + .lc-field {
  margin-top: 18px;
}

/* A visible cue and keyboard focus treatment for tables that really overflow. */
.lc-lesson .lc-table-overflow-hint {
  margin:0 0 8px;
  color:#465e6c;
  font-size:.875em;
  line-height:1.45;
}
.lc-lesson .lc-table-overflow-hint[hidden] { display:none!important; }
.lc-lesson .lc-table-wrap:focus-visible {
  outline:3px solid #007d9e;
  outline-offset:3px;
}

/* Separate plain editorial sections. The theme resets the final paragraph's
   margin and gives every heading a zero top margin. Existing cards, quick
   checks and .lc-section components retain their own spacing. */
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-lesson > section:not([class]):not(:first-child),
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-lesson > section[class=""]:not(:first-child) {
  margin-top:32px;
}
/* A subheading after prose needs space even inside an existing section. */
body:is(.crcg-release-content,.crcg-release-preview) #container #content :is(.lc-lesson,.lc-lesson > section:not([class]),.lc-lesson > section[class=""],.lc-lesson > section.lc-section:not(.lc-tool):not(.lc-worksheet):not(.lc-inquiry):not(.lc-callout):not(.lc-example)) > :is(p,ul,ol,table,figure,div) + :is(h2,h3) {
  margin-top:28px;
}
/* Keep legacy floated editorial images within their own plain section. */
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-main-page > section:not([class]),
body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-main-page > section[class=""] {
  display:flow-root;
  clear:both;
}
@media (max-width:640px) {
  body:is(.crcg-release-content,.crcg-release-preview) #container #content .lc-main-page > section > figure[style*="float"] {
    float:none!important;
    max-width:100%!important;
    margin:18px 0!important;
  }
}
