@media (max-width: 639px) {
  .beam-guide-page .mobile-stack-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--color-slate-500);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    line-height: 1.4;
    text-transform: uppercase;
  }

  .beam-guide-page .mobile-stack-table td[data-label="Beam type"]::before,
  .beam-guide-page .mobile-stack-table td[data-label="Support type"]::before {
    display: none;
  }
}

.beam-guide-page .simple-beam-showcase {
  display: grid;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.beam-guide-page .simple-beam-showcase__diagram {
  padding: 1.25rem;
  background:
    radial-gradient(circle at 14% 18%, rgb(20 184 166 / 0.10), transparent 28%),
    linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.beam-guide-page .simple-beam-showcase__notes {
  border-top: 1px solid #e2e8f0;
  padding: 1.25rem;
  background: #fff;
}

.beam-guide-page .simple-beam-model-svg,
.beam-guide-page .simple-load-svg {
  display: block;
  width: 100%;
  height: auto;
}

/* "What to read from the figure" legend.
 *
 * Stacks vertically by default, expands to a 3-column row only on mid widths
 * (sm/md) where the showcase is full-bleed. At lg+ the showcase splits into
 * a 2-column grid (figure | legend) and the legend column is too narrow for
 * 3 inline columns, so we collapse back to a single column there. */
.beam-guide-page .simple-beam-notes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (min-width: 640px) and (max-width: 1023px) {
  .beam-guide-page .simple-beam-notes-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

.beam-guide-page .simple-beam-note {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.55rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #f8fafc;
  color: #475569;
  font-size: 0.85rem;
  line-height: 1.5;
}

.beam-guide-page .simple-beam-note__mark {
  flex: 0 0 auto;
  width: 0.65rem;
  height: 0.65rem;
  margin-top: 0.4rem;
  border-radius: 999px;
  box-shadow: 0 0 0 3px #fff;
}

.beam-guide-page .simple-beam-note p {
  margin: 0;
}

.beam-guide-page .simple-beam-note p + p {
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.5;
}

.beam-guide-page .simple-beam-note__mark--reaction {
  background: #0d9488;
}

.beam-guide-page .simple-beam-note__mark--moment {
  background: #1d4ed8;
}

.beam-guide-page .simple-beam-note__mark--span {
  background: #94a3b8;
}

.beam-guide-page .simple-beam-note__mark--moment-fixed {
  background: #1e3a8a;
}

.beam-guide-page .simple-beam-note__mark--free {
  background: #cbd5e1;
}

.beam-guide-page .simple-beam-note__mark--overhang {
  background: #f59e0b;
}

.beam-guide-page .simple-load-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.beam-guide-page .simple-load-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  background: #f0fdfa;
  color: #0f766e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  font-weight: 800;
}

.beam-guide-page .simple-load-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.beam-guide-page .simple-load-insights span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
  padding: 0.45rem 0.55rem;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.beam-guide-page .simple-formula-list {
  margin-top: 1rem;
  border-top: 1px solid #e2e8f0;
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
}

.beam-guide-page .simple-formula-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.8rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.beam-guide-page .simple-formula-row dt {
  color: #64748b;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.beam-guide-page .simple-formula-row dd {
  min-width: 0;
  text-align: right;
  white-space: nowrap;
}

.beam-guide-page .simple-load-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  border-radius: 0.75rem;
  background: #0f766e;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.beam-guide-page .simple-load-card__link:hover,
.beam-guide-page .simple-load-card__link:focus {
  background: #115e59;
  color: #fff;
  text-decoration: none;
}

.beam-guide-page .beam-formula-symbols {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.beam-guide-page .beam-formula-symbols span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  border: 1px solid #ccfbf1;
  border-radius: 999px;
  background: #f0fdfa;
  padding: 0.45rem 0.7rem;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.beam-guide-page .beam-formula-symbols b {
  color: #0f766e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
}

.beam-guide-page .beam-formula-note {
  margin: 0.75rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.55;
}

.beam-guide-page .beam-formula-table-wrap {
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.beam-guide-page .beam-formula-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.beam-guide-page .beam-formula-table__config-col {
  width: 28%;
}

.beam-guide-page .beam-formula-table__schematic-col {
  width: 22%;
}

.beam-guide-page .beam-formula-table__formula-col {
  width: 50%;
}

.beam-guide-page .beam-formula-table thead {
  background: #f8fafc;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.beam-guide-page .beam-formula-table th,
.beam-guide-page .beam-formula-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 0.62rem 0.9rem;
  vertical-align: middle;
}

.beam-guide-page .beam-formula-table tbody tr:last-child td {
  border-bottom: 0;
}

.beam-guide-page .beam-formula-table__group th {
  border-bottom: 1px solid #ccfbf1;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 0.48rem 0.9rem;
  text-transform: uppercase;
}

.beam-guide-page .beam-formula-table__name {
  margin: 0;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.3;
}

.beam-guide-page .beam-formula-table__desc {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.45;
}

.beam-guide-page .beam-formula-table__link {
  display: inline-flex;
  margin-top: 0.28rem;
  color: #378e8f;
  font-size: 0.74rem;
  font-weight: 800;
  opacity: 0.75;
  text-decoration: none;
}

.beam-guide-page .beam-formula-table__link:hover,
.beam-guide-page .beam-formula-table__link:focus {
  color: #2d7172;
  opacity: 1;
  text-decoration: none;
}

.beam-guide-page .beam-formula-table__schematic-cell {
  width: 13.25rem;
}

.beam-guide-page .beam-formula-schematic {
  display: block;
  width: 12rem;
  max-width: 100%;
  height: auto;
}

.beam-guide-page .beam-formula-table__formulas {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
}

.beam-guide-page .beam-formula-table__formulas div {
  display: grid;
  grid-template-columns: minmax(7rem, 0.5fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: baseline;
}

.beam-guide-page .beam-formula-table__formulas dt {
  color: #475569;
  font-size: 0.92em;
  font-weight: 900;
}

.beam-guide-page .beam-formula-table__formulas dd {
  margin: 0;
  text-align: right;
}

.beam-guide-page .beam-formula-table__formulas dd span {
  margin-left: 0.5rem;
  color: #94a3b8;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.beam-guide-page .beam-formulas-cta {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  border: 1px solid #a8eaeb;
  border-radius: 1rem;
  background: #ecfbfb66;
  padding: 1.25rem;
}

.beam-guide-page .beam-formulas-cta p {
  margin: 0;
  color: #334155;
  font-size: 1rem;
  line-height: 1.65;
}

.beam-guide-page .beam-formulas-cta > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.beam-guide-page .beam-formulas-cta__button,
.beam-guide-page .beam-formulas-cta__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.beam-guide-page .beam-formulas-cta__button {
  background: #47b8b8;
  padding: 0.75rem 1rem;
  color: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
}

.beam-guide-page .beam-formulas-cta__button:hover,
.beam-guide-page .beam-formulas-cta__button:focus {
  background: #378e8f;
  color: #fff;
  text-decoration: none;
}

.beam-guide-page .beam-formulas-cta__link {
  color: #378e8f;
}

.beam-guide-page .beam-formulas-cta__link:hover,
.beam-guide-page .beam-formulas-cta__link:focus {
  color: #2d7172;
  text-decoration: none;
}

.beam-guide-page .worked-example-stack {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.beam-guide-page .worked-example-card {
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 18px 40px rgb(15 23 42 / 0.08);
}

.beam-guide-page .worked-example-card--simply {
  border-color: #99f6e4;
}

.beam-guide-page .worked-example-card--cantilever {
  border-color: #bfdbfe;
}

.beam-guide-page .worked-example-card__header {
  display: grid;
  gap: 1rem;
  align-items: start;
  border-bottom: 1px solid #e2e8f0;
  background:
    radial-gradient(circle at 9% 0%, rgb(20 184 166 / 0.14), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 54%, #ecfeff 100%);
  padding: 1.25rem;
}

.beam-guide-page .worked-example-card--cantilever .worked-example-card__header {
  background:
    radial-gradient(circle at 9% 0%, rgb(37 99 235 / 0.10), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 54%, #eff6ff 100%);
}

.beam-guide-page .worked-example-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  background: rgb(240 253 250 / 0.85);
  padding: 0.35rem 0.65rem;
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
}

.beam-guide-page .worked-example-card--cantilever .worked-example-card__eyebrow {
  border-color: #bfdbfe;
  background: rgb(239 246 255 / 0.9);
  color: #1d4ed8;
}

.beam-guide-page .worked-example-card__header h3 {
  margin: 0.75rem 0 0;
  max-width: 54rem;
  color: #0f172a;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.beam-guide-page .worked-example-card__header-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  background: #47b8b8;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
}

.beam-guide-page .worked-example-card__header-link:hover,
.beam-guide-page .worked-example-card__header-link:focus {
  background: #378e8f;
  color: #fff;
  text-decoration: none;
}

.beam-guide-page .worked-example-card__body {
  display: grid;
  gap: 1.25rem;
  padding: 1.25rem;
}

.beam-guide-page .worked-example-visual {
  margin: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  background:
    linear-gradient(90deg, rgb(148 163 184 / 0.12) 1px, transparent 1px),
    linear-gradient(180deg, rgb(148 163 184 / 0.12) 1px, transparent 1px),
    #f8fafc;
  background-size: 28px 28px;
}

.beam-guide-page .worked-example-visual__label {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  background: rgb(255 255 255 / 0.82);
  padding: 0.85rem 1rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.beam-guide-page .worked-example-visual__label span:last-child {
  color: #0f766e;
  letter-spacing: 0.02em;
  text-transform: none;
}

.beam-guide-page .worked-example-card--cantilever .worked-example-visual__label span:last-child {
  color: #1d4ed8;
}

.beam-guide-page .worked-example-visual .simple-load-svg {
  padding: 0.75rem 0.75rem 0.35rem;
}

.beam-guide-page .worked-example-visual figcaption {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  border-top: 1px solid #e2e8f0;
  background: rgb(255 255 255 / 0.9);
  padding: 0.75rem;
}

.beam-guide-page .worked-example-visual figcaption span {
  display: flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.55rem 0.65rem;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.beam-guide-page .worked-example-dot {
  flex: 0 0 auto;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  box-shadow: 0 0 0 3px #f8fafc;
}

.beam-guide-page .worked-example-dot--load {
  background: #dc2626;
}

.beam-guide-page .worked-example-dot--reaction {
  background: #0d9488;
}

.beam-guide-page .worked-example-dot--moment {
  background: #1d4ed8;
}

.beam-guide-page .worked-example-dot--deflection {
  background: #f59e0b;
}

.beam-guide-page .worked-example-panel {
  display: grid;
  gap: 1rem;
}

.beam-guide-page .worked-example-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.beam-guide-page .worked-example-inputs div {
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #f8fafc;
  padding: 0.9rem;
}

.beam-guide-page .worked-example-inputs__wide {
  grid-column: 1 / -1;
}

.beam-guide-page .worked-example-inputs dt {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.beam-guide-page .worked-example-inputs dd {
  margin: 0.35rem 0 0;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.45;
}

.beam-guide-page .worked-example-inputs dd span {
  color: #0f766e;
}

.beam-guide-page .worked-example-card--cantilever .worked-example-inputs dd span {
  color: #1d4ed8;
}

.beam-guide-page .worked-example-steps {
  display: grid;
  gap: 0.75rem;
}

.beam-guide-page .worked-example-step {
  position: relative;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #fff;
  padding: 0.95rem 1rem 0.95rem 1.1rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.beam-guide-page .worked-example-step::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.25rem;
  background: #94a3b8;
}

.beam-guide-page .worked-example-step--load::before {
  background: #dc2626;
}

.beam-guide-page .worked-example-step--reaction::before {
  background: #0d9488;
}

.beam-guide-page .worked-example-step--moment::before {
  background: #1d4ed8;
}

.beam-guide-page .worked-example-step--deflection::before {
  background: #f59e0b;
}

.beam-guide-page .worked-example-step p {
  margin: 0;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.beam-guide-page .worked-example-step__answer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: baseline;
  margin-top: 0.45rem;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.45rem;
}

.beam-guide-page .worked-example-step code {
  display: block;
  min-width: 0;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.5;
  white-space: normal;
}

.beam-guide-page .worked-example-step strong {
  display: block;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 1.05rem;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.beam-guide-page .worked-example-takeaway {
  margin: 0;
  border: 1px solid #ccfbf1;
  border-radius: 0.85rem;
  background: #f0fdfa;
  padding: 0.95rem 1rem;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.6;
}

.beam-guide-page .worked-example-card--cantilever .worked-example-takeaway {
  border-color: #bfdbfe;
  background: #eff6ff;
}

@media (min-width: 1024px) {
  .beam-guide-page .simple-beam-showcase {
    grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.55fr);
  }

  .beam-guide-page .simple-beam-showcase__diagram,
  .beam-guide-page .simple-beam-showcase__notes {
    padding: 1.5rem;
  }

  .beam-guide-page .simple-beam-showcase__notes {
    border-top: 0;
    border-left: 1px solid #e2e8f0;
  }

  .beam-guide-page .worked-example-card__header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 1.45rem 1.5rem;
  }

  .beam-guide-page .worked-example-card__body {
    grid-template-columns: minmax(0, 1.08fr) minmax(23rem, 0.92fr);
    align-items: stretch;
    padding: 1.5rem;
  }
}

@media (max-width: 520px) {
  .beam-guide-page .simple-load-insights {
    grid-template-columns: 1fr;
  }

  .beam-guide-page .simple-formula-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .beam-guide-page .simple-formula-row dd {
    text-align: left;
    white-space: normal;
  }

  .beam-guide-page .worked-example-card__header,
  .beam-guide-page .worked-example-card__body {
    padding: 1rem;
  }

  .beam-guide-page .worked-example-card__header h3 {
    font-size: 1.25rem;
  }

  .beam-guide-page .worked-example-inputs,
  .beam-guide-page .worked-example-visual figcaption {
    grid-template-columns: 1fr;
  }

  .beam-guide-page .worked-example-visual .simple-load-svg {
    padding-right: 0.35rem;
    padding-left: 0.35rem;
  }
}

@media (min-width: 768px) {
  .beam-guide-page .beam-formulas-cta {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

@media (max-width: 760px) {
  .beam-guide-page .beam-formula-table thead {
    display: none;
  }

  .beam-guide-page .beam-formula-table,
  .beam-guide-page .beam-formula-table tbody,
  .beam-guide-page .beam-formula-table tr,
  .beam-guide-page .beam-formula-table td,
  .beam-guide-page .beam-formula-table th {
    display: block;
  }

  .beam-guide-page .beam-formula-table tr {
    border-bottom: 1px solid #e2e8f0;
  }

  .beam-guide-page .beam-formula-table tbody tr:last-child {
    border-bottom: 0;
  }

  .beam-guide-page .beam-formula-table td {
    border-bottom: 0;
    padding: 0.75rem 1rem;
  }

  .beam-guide-page .beam-formula-table td + td {
    padding-top: 0;
  }

  .beam-guide-page .beam-formula-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.25rem;
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .beam-guide-page .beam-formula-table__group {
    border-bottom: 0;
  }

  .beam-guide-page .beam-formula-table__schematic-cell {
    width: auto;
  }

  .beam-guide-page .beam-formula-schematic {
    width: min(100%, 15rem);
  }

  .beam-guide-page .beam-formula-table__formulas div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.1rem;
  }

  .beam-guide-page .beam-formula-table__formulas dd {
    text-align: left;
  }
}

/* Tailwind preflight zeroes out <sub>/<sup> styling on this page's custom
 * mono font, so the subscripts in formulas like R_A and M_max collapse onto
 * the baseline. Restore the standard HTML5 sizing/baseline-shift so the
 * subscripts read clearly inside .simple-load-insights and .simple-formula-list. */
.beam-guide-page sub,
.beam-guide-page sup {
  font-size: 0.7em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
  font-weight: inherit;
}

.beam-guide-page sub {
  bottom: -0.32em;
}

.beam-guide-page sup {
  top: -0.55em;
}

/* Small inline location qualifier ("at midspan") shown next to formula values
 * for the simply-supported beam max-moment / max-deflection rows. */
.beam-guide-page .simple-formula-where {
  margin-left: 0.6rem;
  color: #94a3b8;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* =========================================================================
 * Extra .simple-beam-note__mark colour modifiers used by the per-stage
 * "Beam diagrams" cards. Each colour matches the corresponding element
 * inside obSimpleSupportedStageSvg() / obSimpleSupportedLoadCaseSvg('udl'):
 *   - load        -> red UDL arrows (#dc2626)
 *   - reaction    -> teal R_A / R_B / H_A callouts (defined above)
 *   - shear       -> green V strip (#10b981)
 *   - moment      -> blue M strip (defined above)
 *   - deflection  -> amber dashed delta strip (#f59e0b)
 * ========================================================================= */
.beam-guide-page .simple-beam-note__mark--load {
  background: #dc2626;
}

.beam-guide-page .simple-beam-note__mark--shear {
  background: #10b981;
}

.beam-guide-page .simple-beam-note__mark--deflection {
  background: #f59e0b;
}

/* =========================================================================
 * Per-stage "Beam diagrams" card stack.
 *
 * The obSimpleSupportedStageSvg figures live inside this wrapper. We
 * keep the cards in a single vertical column at every breakpoint: the
 * stage SVGs are wide-and-short (aspect ~2.5-3.9:1), so they read best
 * when the card itself is full article-width and the diagram + notes sit
 * SIDE-BY-SIDE within each card.
 *
 * That side-by-side internal layout already exists on .simple-beam-showcase
 * at lg+ (1024+) for the simply-supported article. We re-enable it earlier
 * (from sm+) so tablets and small desktops also benefit. The diagram/notes
 * split is 60/40 so the explanatory copy has enough room without making the
 * figures feel secondary.
 *
 *   <sm  (mobile)   stacked content per card (showcase default)
 *   sm+  (>=640)    diagram | notes  (3fr | 2fr, notes min 13rem)
 *   lg+  (>=1024)   diagram | notes  (3fr | 2fr, notes min 16rem)
 *
 * Inside the stack the .simple-beam-notes-grid (which normally fans out to
 * 3 columns at sm-md to fit the simply-supported beam's three notes) is
 * forced to 1 column so the 40% text column remains readable.
 * ========================================================================= */
.beam-guide-page .beam-diagrams-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.beam-guide-page .beam-diagrams-grid .simple-beam-notes-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .beam-guide-page .beam-diagrams-grid .simple-beam-showcase {
    grid-template-columns: minmax(0, 3fr) minmax(13rem, 2fr);
  }

  .beam-guide-page .beam-diagrams-grid .simple-beam-showcase__notes {
    border-top: 0;
    border-left: 1px solid #e2e8f0;
  }
}

@media (min-width: 1024px) {
  .beam-guide-page .beam-diagrams-grid .simple-beam-showcase {
    grid-template-columns: minmax(0, 3fr) minmax(16rem, 2fr);
  }
}

@media (max-width: 420px) {
  .beam-guide-page .beam-diagrams-grid .simple-beam-showcase__diagram,
  .beam-guide-page .beam-diagrams-grid .simple-beam-showcase__notes {
    padding: 1rem;
  }
}
