/* Divi bridge for Tree Problem No Problem (prototype structure, 25 Oct 2026).
   The whole prototype stylesheet (site.css + w1/w3.css) ships in this theme and convert.py keeps the prototype's structure
   (converter.theme_css = "prototype"). Divi wraps every module in extra boxes and gives sections, headings, lists and links
   its own defaults; this file, printed BEFORE site.css (and after Divi's inline CSS), makes Divi's boxes invisible or neutral
   so the prototype rules apply unchanged. Add a rule here only for a Divi default you can SEE leaking (tools/why.py).

   Conventions set by convert.py:
     .sk-t   transparent structure (the row and column Divi needs around every section's content)
     .sk-b   a Divi section/group that stands for a prototype element (kept as a real box, reset to a plain block)
     .sk-i   neutral wrapper around inline-start Text content (stops WordPress wpautop adding <p>)
   Selectors use :where(.sk) so they weigh the same as a one-class rule; later rules in site.css win ties. */

/* ---------- 1. Divi's structure and module wrappers do not generate boxes ---------- */
.sk .sk-t,
.sk .sk-t > .et_pb_column,
.sk .et_pb_text,
.sk .et_pb_text_inner,
.sk .et_pb_code,
.sk .et_pb_code_inner,
.sk .sk-b .et_pb_image,
.sk .sk-b .et_pb_image_wrap,
.sk .sk-i { display: contents; }
/* the Theme Builder header/footer wrappers: the prototype's own <header class="a-header"> is sticky against the page, as in the draft */
.sk .et-l--header, .sk .et-l--header > .et_builder_inner_content,
.sk .et-l--footer, .sk .et-l--footer > .et_builder_inner_content { display: contents; }
.sk #page-container, .sk #et-boc, .sk #et-main-area { overflow: visible; }

/* ---------- 2. sections and groups that carry prototype classes: plain blocks ---------- */
:where(.sk) .sk-b {
  display: block; flex-direction: row; flex-wrap: nowrap; align-items: normal; justify-content: normal;
  column-gap: 0; row-gap: 0; --horizontal-gap: 0px; --vertical-gap: 0px;
  width: auto; max-width: none; min-height: 0; margin: 0; padding: 0; border: 0;
  background-color: transparent; text-align: inherit; position: static;
}
:where(.sk) .sk-b { margin-bottom: 0 !important; } /* Divi's module gap; the generated .m.css copies of the prototype margins load after this */
:where(.sk li).sk-b { display: list-item; list-style: none; }
:where(.sk) .et_pb_text, :where(.sk) .et_pb_code { line-height: inherit; font-size: inherit; font-weight: inherit; color: inherit; text-align: inherit; }
/* Divi prints each text module's own "text-align: start"; two classes win in either order of the cold/warm cache. */
.sk .et_pb_text, .sk .et_pb_code { text-align: inherit; }
/* new sections Ryan adds are transparent (the cream page shows through); a background set in the builder still wins */
:where(.sk) .et_pb_section { background-color: transparent; }

/* ---------- 3. Divi's global element defaults (its reset and theme CSS) back to what the draft had (browser defaults) ---------- */
html, .sk #page-container, .sk #et-main-area, .sk #main-content { background: var(--cream, #f5f0e4); }
:where(.sk) h1, :where(.sk) h2, :where(.sk) h3, :where(.sk) h4, :where(.sk) h5, :where(.sk) h6 { padding: 0; color: inherit; font-weight: 700; line-height: inherit; }
:where(.sk) h1 { font-size: 2em; margin: .67em 0; }
:where(.sk) h2 { font-size: 1.5em; margin: .83em 0; }
:where(.sk) h3 { font-size: 1.17em; margin: 1em 0; }
:where(.sk) h4 { font-size: 1em; margin: 1.33em 0; }
:where(.sk) h5 { font-size: .83em; margin: 1.67em 0; }
:where(.sk) h6 { font-size: .67em; margin: 2.33em 0; }
:where(.sk) p { padding: 0; }
:where(.sk) a { text-decoration: underline; } /* Divi: a { text-decoration: none }; the draft relies on the browser's underline */
:where(.sk) small { font-size: smaller; }
:where(.sk) sup, :where(.sk) sub { font-size: smaller; }
:where(.sk) blockquote { margin: 1em 40px; padding: 0; border: 0; font-style: normal; }
:where(.sk) figure { margin: 1em 40px; }
:where(.sk) dd { margin-left: 40px; }
:where(.sk) ul, :where(.sk) ol { margin: 1em 0; padding-left: 40px; }
:where(.sk) img { max-width: 100%; height: auto; }
/* Divi: .entry-content ul { list-style-type: disc; padding: 0 0 23px 1em; line-height: 26px } outweighs the prototype's one-class list
   rules; build_theme.py writes !important copies of the prototype's list padding/line-height/list-style. Same weight here as Divi's
   rule (loaded later, so it wins over Divi but loses to the prototype's equal-weight rules such as .a-toc ol). */
:where(.sk) .entry-content ul, :where(.sk) .entry-content ol { padding: 0 0 0 40px; line-height: inherit; }
:where(.sk) input, :where(.sk) textarea, :where(.sk) select, :where(.sk) button { -webkit-appearance: none; appearance: none; }
:where(.sk) button { font: inherit; }

/* ---------- 4. things Divi adds around the page ---------- */
.sk .et_builder_inner_content { z-index: auto; }
.sk.et_fixed_nav.et_show_nav #page-container { padding-top: 0 !important; }
.sk #main-content .container::before { display: none; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 99999; background: var(--ink, #000); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- 5. the quote form: Divi's Contact Form module (class a-form from the prototype) dressed as the draft's form card ----------
   The card itself (.a-form: cream, radius, padding, shadow) comes from site.css. Divi puts the label and the input side by side
   in a field box (the draft nests the input in the label), so the spacing moves to the field box. */
.sk .a-form .et_pb_contact { margin: 0; padding: 0; }
.sk .a-form .et_pb_contact_form { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; row-gap: 0; margin: 0; padding: 0; }
.sk .a-form .et_pb_contact_form > * { grid-column: 1 / -1; }
.sk .a-form .et_pb_contact_form > .et_pb_contact_field.et_flex_column_12_24 { grid-column: auto; }
.sk .a-form .et_pb_contact_field { display: block; width: auto; max-width: none; margin: 0 0 16px !important; padding: 0; position: relative; }
.sk .a-form .et_pb_contact_form_label { display: block; font: 600 14px/1.3 var(--sans); color: var(--f); margin: 0 !important; padding: 0; } /* !important: site.m.css copies the draft's .a-form label margin */
.sk .a-form .et_pb_contact_field .input { display: block; width: 100%; margin: 7px 0 0; font: 400 16px/1.4 var(--sans); padding: 14px 16px; border: 1.5px solid var(--ln); border-radius: 14px; background: #fff; color: var(--tx); box-shadow: none; }
.sk .a-form .et_pb_contact_field .input:focus { outline: 0; border-color: var(--g); box-shadow: 0 0 0 4px rgba(31,122,58,.15); background: #fff; color: var(--tx); }
.sk .a-form .et_pb_contact_field textarea.input { min-height: 120px; resize: vertical; }
.sk .a-form .et_pb_contact_field select.input { -webkit-appearance: auto; appearance: auto; }
.sk .a-form .et_pb_contact_field[data-type="select"]::after { display: none; }
.sk .a-form .et_pb_contact_field .input::placeholder { color: #8a948c; opacity: 1; }
.sk .a-form .et_contact_bottom_container { display: block; float: none; width: 100%; margin: 6px 0 0; text-align: left; }
.sk .a-form .et_pb_button_wrapper { display: block; }
.sk .a-form .et_pb_contact_submit,
.sk .a-form .et_pb_contact_submit:hover { display: block; width: 100%; margin: 0; background: var(--sun); color: var(--f); border: 0; border-radius: 999px; font: 600 17px/1 var(--sans) !important; letter-spacing: 0; padding: 19px 30px !important; box-shadow: 0 1px 0 rgba(0,0,0,.08), inset 0 -2px 0 rgba(0,0,0,.08); transition: transform .2s, background .2s; cursor: pointer; }
.sk .a-form .et_pb_contact_submit:hover { background: var(--sun2); transform: translateY(-1px); }
.sk .a-form .et_pb_contact_submit::after, .sk .a-form .et_pb_contact_submit::before { display: none; }
.sk .a-form .et-pb-contact-message { font: 500 15px/1.5 var(--sans); color: var(--f); }
.sk .a-form .et-pb-contact-message:empty { display: none; }
.sk .a-form .et-pb-contact-message ul { margin: 0 0 14px; padding-left: 20px; }
.sk .a-form .et_contact_error { border-color: #c0392b !important; }
@media (max-width: 760px) {
  .sk .a-form .et_pb_contact_form { grid-template-columns: 1fr; }
}

/* ---------- 6. rules written with a child combinator (parent > *) meet Divi's module wrappers ---------- */
/* Wrapper boxes are display: contents, so a rule on "> *" would land on a wrapper: repeat it one level down here when you meet it. */
.sk .a-article .et_pb_text_inner > .a-prose { min-width: 0; } /* w3.css .a-article > * (the article body is one Text module) */
.sk .sk-c { display: contents; } /* a loop Group that only repeats its link (the related-posts cards sit straight in .a-related) */
.sk .a-toc--empty .a-toc__label, .sk .a-toc--empty ol { display: none; }
