/* Wider main content area */

.md-grid {
  max-width: 95%;
}

/* Give more space to the central content */

/* Improve readability */

mark {
  background-color: #ffe066;
  padding: 0.1em 0.25em;
  border-radius: 4px;
}

.md-typeset {
  font-size: 0.92rem;
  line-height: 1.75;
}

.md-typeset hr {
  display: none;
}

/* More modern headings */

.md-typeset h4 {
  font-size: 1.25em;
  font-weight: 600;
  margin-top: 2.7rem;
  margin-bottom: 0.7rem;
}

.md-typeset h5 {
  font-size: 1.1em;
  font-weight: 600;
  margin-top: 2.4rem;
  margin-bottom: 0.6rem;
}

.md-typeset h6 {
  font-size: 1em;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

/* Make images more balanced */

.md-typeset figure {
  margin-top: 1.2rem;
  margin-bottom: 0.8rem;
  text-align: center;
}

.md-typeset figure img {
  display: block;
  margin: 0 auto;
  border-radius: 12px;
}

.md-typeset figcaption {
  max-width: 900px;
  margin: 0.15rem auto 0 auto;
  text-align: right;
  font-size: 0.9rem;
  font-style: italic;
  color: #666;
}

/* Sidebar slightly narrower */

.md-sidebar--primary {
  width: 11rem;
}

.md-sidebar--secondary {
  width: 13rem;
}

.md-typeset .admonition,
.md-typeset details {
  font-size: 0.92rem;
  line-height: 1.75;
}

.md-typeset .admonition-title,
.md-typeset summary {
  font-size: 0.92rem;
  font-weight: 600;
}

.md-typeset table:not([class]) tr {
  display: table-row !important;
}

.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
  display: table-cell !important;
  width: auto;
  vertical-align: top;
}

.md-typeset ul,
.md-typeset ol {
  padding-left: 2.2rem;
  line-height: 1.15 !important;
  margin-bottom: 0.8rem;
}

.md-typeset .admonition {
  margin-top: 4.5em;
  margin-bottom: 1.6em;
  border-radius: 0.8rem;
}

/* ---------- Custom teaching blocks ---------- */

.example-block {
  border-left: 4px solid var(--md-primary-fg-color);
  background: rgba(120, 120, 120, 0.05);
  padding: 1rem 1.3rem;
  margin: 2rem 0;
  border-radius: 0.7rem;
}

.definition-block {
  background: rgba(120, 120, 120, 0.07);
  padding: 1rem 1.3rem;
  margin: 1.8rem 0;
  border-radius: 0.7rem;
  border-left: 4px solid rgba(100, 110, 140, 0.45);
}

.recap-block {
  background: rgba(80, 140, 255, 0.08);
  padding: 1rem 1.3rem;
  margin: 2rem 0;
  border-radius: 0.7rem;
  border-left: 4px solid var(--md-accent-fg-color);
}

.common-mistake-block {
  background: rgba(255, 170, 0, 0.08);
  padding: 1rem 1.3rem;
  margin: 2rem 0;
  border-radius: 0.7rem;
  border-left: 4px solid #d97706;
}

.exam-focus-block {
  background: rgba(220, 38, 38, 0.08);
  padding: 1rem 1.3rem;
  margin: 2rem 0;
  border-radius: 0.7rem;
  border-left: 4px solid #dc2626;
}

/* Titles inside custom blocks */

.example-block h4,
.definition-block h4,
.recap-block h4,
.common-mistake-block h4,
.exam-focus-block h4 {
  margin-top: 0;
  margin-bottom: 0.7rem;
}

/* ---------- A3.2 classroom edition ---------- */

.lesson-page {
  --lesson-ink: #172033;
  --lesson-blue: #2457a6;
  --lesson-paper: #f7f8fb;
  color: var(--lesson-ink);
}

.lesson-page > h1 {
  margin-bottom: 0.25rem;
}

.lesson-lead {
  margin-top: 0;
  font-size: 1.2rem;
  color: #536078;
}

.lesson-meta {
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid #d9dfeb;
  border-left: 5px solid var(--lesson-blue);
  border-radius: 0.6rem;
  background: var(--lesson-paper);
}

.lesson-meta ul {
  margin-bottom: 0;
}

.lesson-page mark {
  padding: 0.08em 0.2em;
  border-radius: 0.18em;
  background: linear-gradient(
    transparent 16%,
    #eaff3f 16%,
    #eaff3f 88%,
    transparent 88%
  );
  color: inherit;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.concept-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.concept-card {
  padding: 1rem 1.1rem;
  border: 1px solid #d9dfeb;
  border-top: 5px solid var(--lesson-blue);
  border-radius: 0.65rem;
  background: #fff;
  box-shadow: 0 0.2rem 0.8rem rgba(23, 32, 51, 0.06);
}

.concept-card h3 {
  margin-top: 0;
  padding-bottom: 0.35rem;
}

.lesson-figure {
  margin: 1.25rem 0;
}

.lesson-figure--wide img {
  width: 100%;
  max-height: 32rem;
  object-fit: contain;
}

.lesson-page .lesson-figure figcaption {
  max-width: none;
  margin-top: 0.55rem;
  text-align: left;
  font-style: normal;
  line-height: 1.45;
  color: #536078;
}

.image-text-pair {
  display: grid;
  grid-template-columns: minmax(16rem, 0.9fr) minmax(18rem, 1.1fr);
  gap: 2rem;
  align-items: center;
  margin: 1rem 0 2.25rem;
}

.image-text-pair--reverse .lesson-figure {
  order: 2;
}

.memory-strip {
  margin: 1.5rem 0;
  padding: 0.9rem 1rem;
  border-radius: 0.5rem;
  background: #172033;
  color: #fff;
  text-align: center;
  letter-spacing: 0.01em;
}

.lesson-page .admonition {
  margin-top: 1.7rem;
}

.structural-members-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
  margin: 1.25rem 0 2rem;
}

.structural-members-grid .lesson-figure {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid #d9dfeb;
  border-radius: 0.65rem;
  background: #fff;
}

.structural-members-grid img {
  width: 100%;
  height: 18rem;
  object-fit: contain;
}

.beam-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.2rem 0 1.5rem;
}

.beam-photo-grid .lesson-figure {
  margin: 0;
  border: 1px solid #d9dfeb;
  border-radius: 0.65rem;
  overflow: hidden;
  background: #fff;
}

.beam-photo-grid img {
  width: 100%;
  height: 18rem;
  object-fit: cover;
  border-radius: 0;
}

.lesson-page .beam-photo-grid figcaption {
  margin: 0;
  padding: 0.45rem 0.7rem;
  color: var(--lesson-ink);
  text-align: center;
  font-size: 1rem;
}

.force-figure {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  break-inside: avoid;
}

.force-figure img {
  border: 1px solid #d9dfeb;
  background: #fff;
}

.lesson-page .process-list {
  margin-top: 1.4rem;
  margin-bottom: 1.8rem;
  padding-left: 2rem;
  line-height: 1.6 !important;
}

.lesson-page .process-list li {
  margin-bottom: 0.85rem;
  padding-left: 0.35rem;
  line-height: 1.6;
}

.lesson-page .process-list li:last-child {
  margin-bottom: 0;
}

.lesson-page .process-list li::marker {
  color: var(--lesson-blue);
  font-weight: 700;
}

.sentence-frame-exercise .admonition.question > p:first-of-type {
  margin-bottom: 1rem;
}

.sentence-frame-exercise ol {
  margin-top: 1rem;
  margin-bottom: 1.4rem;
  padding-left: 2rem;
  line-height: 1.6 !important;
}

.sentence-frame-exercise ol li {
  padding-left: 0.35rem;
  line-height: 1.6;
}

.sentence-frame-exercise ol li + li {
  margin-top: 1rem;
}

.sentence-frame-exercise ol li::marker {
  color: var(--lesson-blue);
  font-weight: 700;
}

.sentence-frame-exercise details.success {
  margin-top: 1.6rem;
  margin-bottom: 0.35rem;
}

.sentence-frame-exercise details.success[open] > summary {
  margin-bottom: 1rem;
}

.sentence-frame-exercise details.success ol {
  margin-top: 0.9rem;
  margin-bottom: 0.5rem;
}

.strengthening-section ul,
.strengthening-section ol {
  line-height: 1.55 !important;
}

.strengthening-section li + li {
  margin-top: 0.45rem;
}

.layer-direction,
.material-combination {
  margin: 1.35rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid #d9dfeb;
  border-radius: 0.55rem;
  background: #f7f8fb;
  text-align: center;
  line-height: 1.7;
}

.material-combination {
  border-left: 5px solid var(--lesson-blue);
}

@media screen and (max-width: 800px) {
  .concept-cards,
  .image-text-pair {
    grid-template-columns: 1fr;
  }
  .image-text-pair--reverse .lesson-figure {
    order: initial;
  }
  .beam-photo-grid {
    grid-template-columns: 1fr;
  }
  .structural-members-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .concept-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45cm;
  }
  .concept-card {
    padding: 0.4cm;
    box-shadow: none;
    break-inside: avoid;
  }
  .image-text-pair {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 0.7cm;
    break-inside: avoid;
  }
  .beam-photo-grid {
    gap: 0.35cm;
    break-inside: avoid;
  }
  .structural-members-grid {
    gap: 0.4cm;
    break-inside: avoid;
  }
  .structural-members-grid img {
    height: 5.5cm;
  }
  .beam-photo-grid img {
    height: 5.2cm;
  }
  .lesson-page mark {
    background: #eaff3f !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .memory-strip {
    background: #e9edf5;
    color: #172033;
    border: 1px solid #aeb9cb;
  }
}

/* Server-rendered equations: identical, selectable output in web and PDF. */

.math-display {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  margin: 1.5rem auto;
  text-align: center;
  font-family: "Noto Sans Math", "DejaVu Serif", serif;
  font-size: 1.18em;
  line-height: 1.35;
}

.math-inline {
  display: inline-block;
  font-family: "Noto Sans Math", "DejaVu Serif", serif;
  line-height: 1;
  vertical-align: -0.08em;
}

.math-row,
.math-script,
.math-root {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}

.math-frac {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  margin: 0 0.28em;
  line-height: 1.12;
  text-align: center;
  vertical-align: middle;
}

.math-num {
  display: block;
  padding: 0.05em 0.3em 0.12em;
  border-bottom: 0.075em solid currentcolor;
}

.math-den {
  display: block;
  padding: 0.12em 0.3em 0.05em;
}

.math-identifier {
  font-style: italic;
}

.math-text,
.math-number {
  font-style: normal;
}

.math-operator {
  margin: 0 0.16em;
  font-style: normal;
}

.math-space {
  display: inline-block;
  flex: 0 0 auto;
}

.math-script > sup,
.math-script > sub {
  margin-left: 0.08em;
  font-size: 0.72em;
  line-height: 0;
}

.math-script-stack {
  display: inline-flex;
  flex-direction: column;
  margin-left: 0.08em;
  font-size: 0.72em;
  line-height: 0.9;
}

.math-script-stack > sup,
.math-script-stack > sub {
  line-height: 1;
}

.math-radical {
  font-size: 1.25em;
}

.math-radicand {
  padding: 0.05em 0.12em 0;
  border-top: 0.075em solid currentcolor;
}

.math-root--indexed > sup {
  margin-right: -0.12em;
  font-size: 0.62em;
}

/* =========================================
   DESIGN TECHNOLOGY — LEVEL BADGES
   \========================================= */

.dt-badge {
  display: inline-block;
  padding: 2px 7px;
  margin-left: 5px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.3px;
  vertical-align: middle;
  white-space: nowrap;
}

/* Standard Level — verde claro */

.dt-badge-sl {
  background-color: #d9f5df;
  color: #237a3b;
}

/* Higher Level — azul claro */

.dt-badge-hl {
  background-color: #dceeff;
  color: #2365a8;
}

/* =========================================
   SYLLABUS HOME — TWO COLUMNS
   \========================================= */

.syllabus-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  margin-top: 40px;
}

.syllabus-column {
  min-width: 0;
}

.syllabus-column h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
  font-size: 22px;
}

/* Topic links */

.syllabus-column ul {
  list-style: none;
  padding-left: 0;
  margin-top: 20px;
}

.syllabus-column li {
  margin-bottom: 14px;
}

.syllabus-column li a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f7f8fa;
  color: #263238;
  text-decoration: none;
  transition: background 0.2s ease;
}

.syllabus-column li a:hover {
  background: #edf1fa;
  color: #4053b5;
}

/* Responsive */

@media screen and (max-width: 768px) {
  .syllabus-columns {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* =========================================
   DESIGN TECHNOLOGY — IMAGE SPACING
   \========================================= */

/* Images inserted directly in Markdown */

/* Figures with captions */

/* Images inside figures */

/* Figure captions */

/* =========================================
   DESIGN TECHNOLOGY — FIGURE SPACING
   \========================================= */

.md-content {
  padding-left: 10%;
  padding-right: 10%;
  max-width: none;
}

.md-typeset h1 {
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 2.2em;
  margin-top: 0;
  margin-bottom: 1.2rem;
}

.md-typeset h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 3.2rem;
  padding-top: 5rem;
  font-size: 1.7em;
  margin-bottom: 1.25rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--md-primary-fg-color);
}

.md-typeset h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 3rem;
  padding-bottom: 0.3rem;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid rgba(100, 110, 140, 0.16);
  font-size: 1.5em;
}

.md-typeset table:not([class]) {
  font-size: .92rem;
  display: table !important;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  table-layout: fixed;
}

/* =====================================================
   IMAGE SPACING — use class="dt-image" on <figure>
   ===================================================== */


.md-typeset figure.dt-image {
    display: flow-root;
    clear: both;

    width: fit-content;
    max-width: 100%;

    margin: 0 auto 0rem;
    padding-top: 4rem;
    padding-bottom: 4rem;

    text-align: center;
}

/* Remove Markdown-generated paragraph spacing */
.md-typeset figure.dt-image > p {
    margin: 0;
    padding: 0;
}

/* Images */
.md-typeset figure.dt-image img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
}

/* Captions */
.md-typeset figure.dt-image figcaption {
    margin-top: 0.5rem;
}

/* Also works when MkDocs wraps the figure in a paragraph. */
.md-typeset p:has(> figure.dt-image) {
  display: flow-root;
  margin-block: 2rem;
}

/* Standalone Markdown image with .dt-image */
.md-typeset p:has(> img.dt-image) {
  margin-block: 2rem;
}