/* Lesson-internal styles only. Site layout, hero, navbar and sidebar remain
   exclusively controlled by /assets/css/site-sidebar.css. */
.gf-body { line-height: 1.7; overflow-wrap: break-word; }
.gf-body p { margin: .85em 0; }
.gf-body li { margin-block: .45em; }
.gf-body h4 { font-size: 1.08rem; line-height: 1.4; margin: 1.25rem 0 .55rem; }
.gf-body h5 { font-size: 1rem; line-height: 1.4; margin: .2rem 0 .7rem; }
.gf-body section[id], .gf-subheading, .gf-practice, .gf-answer { scroll-margin-top: 6.5rem; }
.gf-subheading { display: flex; gap: .65em; align-items: baseline; margin: 2rem 0 .8rem; padding-bottom: .45rem; border-bottom: 2px solid #dce6e9; color: #34464d; font-size: clamp(1.2rem,2vw,1.5rem); line-height: 1.35; }
.gf-subheading > span { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.gf-question h3 { margin: 0 0 .9rem; color: #34464d; font-size: 1.14rem; line-height: 1.45; }
.gf-question h3 > span { display: block; font-weight: 600; color: #485f68; }
.gf-question h3 .gf-gdc { display: inline-flex; }
.gf-tasks, .gf-actions { padding-left: 1.65rem; }
.gf-tasks li::marker { font-weight: 800; color: #34464d; }
.gf-tasks a { white-space: nowrap; font-size: .9em; }
.gf-continuation { padding: .75rem 1rem; background: #f3f6f7; border-left: 3px solid #657b84; border-radius: 0 8px 8px 0; }
.gf-callout { background: #f3f4f2; border: 1px solid #c7cbc5; border-left: 4px solid #657b84; border-radius: 10px; padding: .9rem 1.05rem; margin: 1.25rem 0; }
.gf-callout h4 { margin: 0 0 .45rem; color: #34464d; }
.gf-callout p:first-child, .gf-callout ol:first-child { margin-top: 0; }
.gf-callout p:last-child, .gf-callout ol:last-child { margin-bottom: 0; }
.gf-warning { background: #faf5ee; border-color: #dfc8ac; border-left-color: #a37c55; }
.gf-warning h4 { color: #674a2d; }
.gf-panel { border: 1px solid #d5e0e3; border-radius: 12px; background: #fafcfc; padding: 1rem; }
.gf-panel h4 { margin-top: 0; }
.gf-two { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1.35rem; align-items: start; margin: 1.25rem 0; }
.gf-two > * { min-width: 0; }
.gf-figure { margin: 1.3rem auto; max-width: 900px; }
.gf-figure a { display: block; border: 1px solid #dbe4e6; border-radius: 9px; background: #fff; padding: .55rem; }
.gf-figure img { display: block; width: 100%; height: auto; border-radius: 3px; }
.gf-figure figcaption { margin-top: .55rem; color: #46565d; font-size: .92rem; line-height: 1.5; }
.gf-figure.gf-small { max-width: 560px; }
.gf-figure.gf-screen { max-width: 720px; }
.gf-figure.gf-keypad { max-width: 760px; }
.gf-two .gf-figure { margin-top: 0; }
.gf-calculator-check { display: grid; grid-template-columns: minmax(100px,.27fr) minmax(0,1fr); gap: 1.5rem; align-items: start; }
.gf-calculator-check .gf-var-menu { max-width: 150px; }
.gf-table-wrap { overflow-x: auto; max-width: 100%; margin: 1rem 0; border: 1px solid #d7e0e3; border-radius: 9px; }
.gf-table { border-collapse: collapse; width: 100%; min-width: 280px; text-align: center; font-size: .96rem; }
.gf-table th, .gf-table td { padding: .65rem .7rem; border-bottom: 1px solid #dce3e6; }
.gf-table th { font-weight: 700; background: #f1f5f6; }
.gf-table tbody tr:last-child > * { border-bottom: 0; }
.gf-table.gf-compare { min-width: 480px; text-align: left; }
.gf-compare th:first-child { width: 17%; }
.gf-math { max-width: 100%; overflow-x: auto; padding: .2rem .1rem; }
.gf-math mjx-container[display="true"] { margin: .8em 0 !important; }
.gf-body kbd { display: inline-block; border: 1px solid #c0cbd0; border-bottom-width: 2px; border-radius: 5px; background: #fff; padding: .06em .37em; color: #263a43; font-family: inherit; font-size: .9em; font-weight: 650; white-space: nowrap; }
.gf-body code { background: #edf2f4; border-radius: 4px; padding: .1em .3em; font-size: .93em; overflow-wrap: anywhere; }
.gf-menu { font-weight: 650; color: #324d5a; }
.gf-symbol-key { padding: .8rem 1rem; background: #f6f8f8; border-radius: 10px; }
.gf-symbol-key p { display: block; }
.gf-symbol-key p > span { display: inline-block; font-size: 1.4rem; width: 1.6rem; margin-right: .55rem; text-align: center; }
.gf-settings { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid #d5e0e3; border-radius: 10px; overflow: hidden; margin: 1rem 0; }
.gf-settings > div { padding: .75rem; text-align: center; border-right: 1px solid #d5e0e3; }
.gf-settings > div:last-child { border-right: 0; }
.gf-settings strong { display: block; font-size: .9rem; color: #465d66; }
.gf-gdc { display: inline-flex; align-items: center; border: 1px solid #b7cbd2; border-radius: 4px; padding: .03em .35em; font-size: .73rem; font-weight: 800; color: #375d6b; white-space: nowrap; vertical-align: middle; }
.gf-solution { margin: 1rem 0 1.4rem; border: 1px solid #d5e0e3; border-radius: 10px; background: #fff; }
.gf-solution summary, .gf-answer summary { cursor: pointer; padding: .85rem 1rem; font-weight: 750; color: #34464d; border-radius: 9px; }
.gf-solution summary { background: #f1f5f6; }
.gf-solution[open] > summary { border-bottom: 1px solid #d5e0e3; border-radius: 9px 9px 0 0; }
.gf-solution-content { padding: .25rem 1rem 1rem; }
.gf-solution-content > :last-child { margin-bottom: 0; }
.gf-practice { border: 1px solid #d2dce0; border-radius: 12px; margin: 1.3rem 0; padding: 1.15rem 1.25rem; }
.gf-practice > h4 { display: flex; gap: .65rem; border-bottom: 1px solid #dce5e8; padding-bottom: .7rem; margin-top: 0; }
.gf-answer { border: 1px solid #d8d0dc; border-radius: 10px; margin: .9rem 0; }
.gf-answer summary { color: #554857; background: #f5f1f6; }
.gf-answer[open] > summary { border-bottom: 1px solid #d8d0dc; border-radius: 9px 9px 0 0; }
.gf-answer-content { padding: .4rem 1.1rem 1rem; }
.gf-answer-button, .gf-dialog-close { appearance: none; cursor: pointer; border: 1px solid #b8c6cd; border-radius: 8px; background: #f0f5f7; color: #273f4b; padding: .6rem .95rem; font: inherit; font-weight: 700; }
.gf-answer-button:hover, .gf-dialog-close:hover { background: #e0ebef; }
.gf-answer-button[hidden] { display: none; }
.gf-self-check { border: 1px solid #c7cbc5; border-radius: 12px; background: #f6f8f6; padding: 1rem 1.25rem 1.2rem; margin: 1.7rem 0 1rem; }
.gf-self-check legend { color: #34464d; font-size: 1.2rem; font-weight: 800; padding: 0 .35rem; }
.gf-self-check label { display: flex; align-items: flex-start; gap: .7rem; margin: .9rem 0; cursor: pointer; }
.gf-self-check input { margin-top: .3rem; width: 1.15rem; height: 1.15rem; flex: 0 0 auto; accent-color: #506873; }
.gf-self-check input:checked + span { color: #355549; }
.gf-tutorial { display: grid; grid-template-columns: minmax(0,.95fr) minmax(0,1.05fr); gap: 1.5rem; align-items: center; border: 1px solid #c6d6dd; border-radius: 14px; background: #f3f8fa; padding: 1.3rem; margin: 1.8rem 0; }
.gf-tutorial h3 { font-size: 1.3rem; line-height: 1.4; color: #34464d; margin: .3rem 0; }
.gf-eyebrow { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #506873; font-weight: 800; }
.gf-video { position: relative; aspect-ratio: 16/9; min-width: 0; background: #e4edf1; border-radius: 9px; overflow: hidden; }
.gf-video iframe { display: block; width: 100%; height: 100%; border: 0; }
.gf-web-note, .gf-source-note { font-size: .92rem; color: #526168; }
.gf-source-note { border-top: 1px solid #dce3e5; padding-top: 1rem; }
.gf-course-links { margin: 1rem 0; font-size: .94rem; line-height: 1.7; }
.gf-course-links a { margin-right: .7rem; }
.gf-calculator-notice { margin: 0 0 1.1rem; padding: 1rem 1.1rem; border-left: 4px solid #657b84; border-radius: 10px; background: #f1f5f6; line-height: 1.6; }
.gf-dialog { border: 1px solid #c2d1d7; border-radius: 14px; max-width: min(94vw,1000px); width: 100%; max-height: 92vh; padding: 0; box-shadow: 0 20px 80px #102f5540; background: white; color: #172e39; }
.gf-dialog::backdrop { background: #102331aa; }
.gf-dialog-head { position: sticky; top: 0; display: flex; gap: 1rem; justify-content: space-between; align-items: center; padding: .8rem 1rem; background: #f4f8f9; border-bottom: 1px solid #d0dce1; z-index: 2; }
.gf-dialog-head h2 { font-size: 1.15rem; line-height: 1.4; margin: 0; }
.gf-dialog-content { padding: .4rem 1rem 1.2rem; line-height: 1.7; overflow-wrap: break-word; }
.gf-dialog-content img { width: 100%; height: auto; }
.gf-dialog-content .gf-figure { max-width: 100%; }
.gf-image-dialog { max-width: min(96vw,1500px); }
.gf-image-dialog .gf-dialog-content { text-align: center; }
.gf-image-dialog .gf-dialog-content > img { max-height: 75vh; width: auto; max-width: 100%; object-fit: contain; }
.gf-body a:focus-visible, .gf-body button:focus-visible, .gf-body summary:focus-visible, .gf-dialog button:focus-visible, .gf-table-wrap:focus-visible { outline: 3px solid #2c6c8b; outline-offset: 3px; }
@media (max-width: 720px) {
  .gf-two, .gf-tutorial { grid-template-columns: minmax(0,1fr); }
  .gf-two { gap: .7rem; }
  .gf-settings { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .gf-settings > div:nth-child(2) { border-right: 0; }
  .gf-settings > div:nth-child(-n+2) { border-bottom: 1px solid #d5e0e3; }
  .gf-calculator-check { grid-template-columns: minmax(0,1fr); gap: .5rem; }
  .gf-calculator-check .gf-var-menu { max-width: 145px; }
  .gf-practice { padding: 1rem; }
  .gf-solution-content { padding-inline: .75rem; }
  .gf-dialog-head { flex-wrap: wrap; }
  .gf-dialog { max-width: 95vw; }
  .gf-math { font-size: .96em; }
}
@media (prefers-reduced-motion: reduce) {
  .gf-body { scroll-behavior: auto; }
}
@media print {
  .gf-answer-button, .gf-dialog, .gf-course-links, .gf-video { display: none !important; }
  .gf-solution, .gf-answer, .gf-practice { break-inside: auto; box-shadow: none; }
  .gf-figure { break-inside: avoid; }
  .gf-body h2, .gf-body h3, .gf-body h4 { break-after: avoid; }
  .gf-table-wrap, .gf-math { overflow: visible; }
}
