/* Guide content below the embedded CFD calculators.
   Loaded after each page's inline styles so it can relax the old
   "iframe fills the viewport, page never scrolls" layout. */

html, body { height: auto; overflow: visible; }
body { min-height: 100vh; overflow-x: hidden; }
.frame-wrap { flex: none; height: calc(100vh - 84px); height: calc(100dvh - 84px); min-height: 480px; }
h1.topbar-title { margin: 0; font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 0; line-height: 1.2; }

/* ── Guide ── */
.guide { max-width: 820px; margin: 0 auto; padding: 64px 24px 96px; color: var(--text2); font-size: 16px; line-height: 1.75; scroll-margin-top: 16px; }
.guide-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: 12px; }
.guide h2 { font-family: 'Sora', sans-serif; font-size: 23px; font-weight: 700; letter-spacing: -.3px; color: var(--text); margin: 44px 0 14px; }
.guide h2#guide-title { font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -.6px; margin: 0 0 16px; }
.guide-lead { font-size: 18px; color: var(--text); line-height: 1.7; margin-bottom: 8px; }
.guide p { margin-bottom: 18px; }
.guide strong { color: var(--text); font-weight: 600; }
.guide a { color: var(--fire); font-weight: 500; }
.guide ul, .guide ol { margin: 0 0 20px; padding-left: 22px; }
.guide li { margin-bottom: 10px; }
.guide ul:not(.refs) li::marker { color: var(--teal); }
.guide ol.steps li::marker { color: var(--teal); font-weight: 700; }
.guide code { font-family: 'JetBrains Mono', monospace; font-size: .88em; background: var(--surface2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; color: var(--text); white-space: normal; }
.guide sub, .guide sup { font-size: .75em; line-height: 0; }

.guide .formula { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--teal); border-radius: 8px; padding: 16px 20px; margin: 0 0 20px; font-family: 'JetBrains Mono', monospace; font-size: 15px; line-height: 2; color: var(--text); overflow-x: auto; }

.guide-table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 14.5px; line-height: 1.55; display: block; overflow-x: auto; }
.guide-table thead th { text-align: left; font-weight: 700; color: var(--text); background: var(--surface2); }
.guide-table th, .guide-table td { padding: 10px 14px; border: 1px solid var(--border); vertical-align: top; min-width: 120px; }
.guide-table tbody th { text-align: left; font-weight: 600; color: var(--text); background: var(--surface); white-space: nowrap; }
.guide-table td { color: var(--text2); }

.guide details.faq { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin: 0 0 10px; }
.guide details.faq summary { cursor: pointer; padding: 14px 44px 14px 18px; font-weight: 600; color: var(--text); list-style: none; position: relative; }
.guide details.faq summary::-webkit-details-marker { display: none; }
.guide details.faq summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 20px; line-height: 1; color: var(--teal); }
.guide details.faq[open] summary::after { content: '–'; }
.guide details.faq p { padding: 0 18px; margin: 0 0 16px; font-size: 15.5px; }
.guide details.faq summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 12px; }

.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 20px; }
.related-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); text-decoration: none; }
.related-card:hover { border-color: var(--teal); text-decoration: none; }
.related-card strong { color: var(--text); font-size: 15px; }
.related-card span { color: var(--text2); font-size: 13.5px; line-height: 1.5; }
.guide-more { font-size: 14.5px; }
.guide ul.refs { list-style: none; padding-left: 0; font-size: 14px; color: var(--text3); }
.guide ul.refs li { margin-bottom: 6px; }

@media (max-width: 640px) {
  .guide { padding: 44px 18px 72px; font-size: 15.5px; }
  .guide-lead { font-size: 17px; }
  .guide h2 { font-size: 21px; }
  .frame-wrap { min-height: 420px; }
}
