.modern-subpage #content.se-page {
  --se-ink: #19363a;
  --se-muted: #415d61;
  --se-line: #cbdcdb;
  --se-panel: #fff;
  --se-soft: #edf6f3;
  --se-accent: #075d54;
  --se-danger: #9d272e;
  --se-primary: #136b61;
  --se-secondary: #70419c;
  color: var(--se-ink);
}
.se-page *, .se-page *::before, .se-page *::after { box-sizing: border-box; min-width: 0; }
.se-page [hidden] { display: none !important; }
.modern-subpage #content.se-page :is(h1,h2,h3,h4,strong,legend,caption) { color: var(--se-ink); }
.modern-subpage #content.se-page h1 { font-size: clamp(24px, 4.5vw, 34px); line-height: 1.35; margin: 10px 0 14px; word-break: keep-all; }
.modern-subpage #content.se-page h2 { font-size: clamp(20px, 3.7vw, 26px); line-height: 1.45; margin: 0 0 12px; }
.modern-subpage #content.se-page h3 { font-size: 18px; line-height: 1.5; margin: 18px 0 10px; }
.modern-subpage #content.se-page p { margin: 10px 0 14px; color: var(--se-muted); line-height: 1.75; overflow-wrap: anywhere; }
.modern-subpage #content.se-page .se-kicker { color: var(--se-accent); font-size: 13px; font-weight: 700; }
.modern-subpage #content.se-page .se-header p:not(.se-kicker) { font-size: 16px; font-weight: 400; margin: 12px 0; }
.se-page .se-panel {
  background: var(--se-panel); border: 1px solid var(--se-line); border-radius: 10px; padding: clamp(12px, 2.7vw, 22px); margin: 16px 0 22px;
}
.se-page fieldset { border: 0; padding: 0; margin: 16px 0; }
.se-page legend { font-weight: 750; margin: 0 0 7px; padding: 0; }
.se-page .se-grid, .se-page .se-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.se-page label { display: block; color: var(--se-ink); font-size: 14px; font-weight: 650; }
.modern-subpage #content.se-page :is(input[type=text],input[type=date],select,textarea) {
  display: block; width: 100%; min-height: 44px; height: auto; margin-top: 4px; padding: 7px 9px; font: inherit; color: var(--se-ink);
  background: var(--se-panel); border: 1px solid var(--se-line); border-radius: 6px;
}
.modern-subpage #content.se-page select { appearance: auto; }
.modern-subpage #content.se-page button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; height: auto; padding: 8px 12px;
  font: inherit; font-size: 14px; font-weight: 750; line-height: 1.45; white-space: normal; color: var(--se-ink);
  background: var(--se-panel); border: 1px solid var(--se-line); border-radius: 7px; box-shadow: none; cursor: pointer;
}
.modern-subpage #content.se-page button:hover { background: var(--se-soft); }
.modern-subpage #content.se-page button.se-primary { background: var(--se-primary); color: white; }
.modern-subpage #content.se-page button:disabled { opacity: .6; cursor: not-allowed; }
.se-page :is(input,select,textarea,button,summary,a,[tabindex]):focus-visible { outline: 3px solid var(--se-accent); outline-offset: 3px; }
.se-page details { border-top: 1px solid var(--se-line); padding: 7px 0; margin-top: 10px; }
.se-page summary { color: var(--se-accent); font-weight: 700; min-height: 40px; padding: 7px 0; cursor: pointer; }
.modern-subpage #content.se-page .se-error { color: var(--se-danger); font-weight: 700; }
.se-page .se-error:empty { display: none; }
.se-page .se-card { background: var(--se-soft); border-radius: 8px; padding: 10px; border: 1px solid var(--se-line); }
.se-page .se-card span, .se-page .se-card strong { display: block; overflow-wrap: anywhere; }
.se-page .se-card strong { font-size: clamp(16px, 3.5vw, 24px); }
.se-page .se-entry { border: 1px solid var(--se-line); border-radius: 8px; padding: 12px; }
.se-page .se-entry legend { padding-inline: 6px; }
.se-page .se-actions label { align-self: end; }
.se-page .se-scroll { max-width: 100%; overflow-x: auto; margin: 12px 0; }
.se-page table { width: 100%; margin: 0; font-size: 13px; color: var(--se-ink); border-collapse: collapse; }
.se-page caption { text-align: left; font-weight: 700; padding-bottom: 6px; }
.se-page :is(th,td) { padding: 8px; border: 1px solid var(--se-line); white-space: nowrap; }
.se-page thead { background: var(--se-soft); }
.se-page .se-header { margin-bottom: 20px; }
.se-page #se-result-title { scroll-margin-top: 95px; }
.se-page .se-guide li { color: var(--se-muted); overflow-wrap: anywhere; }
.se-page .se-guide h2:not(:first-child) { margin-top: 24px !important; }
.se-page [aria-invalid=true] { outline: 2px solid var(--se-danger); }
.modern-subpage #content.se-page.se-dark {
  color-scheme: dark; --se-ink: #ecf6f5; --se-muted: #c6dedb; --se-line: #50736e; --se-panel: #172d30;
  --se-soft: #223d3d; --se-accent: #a4ebd6; --se-danger: #ffbdc1; --se-secondary: #d7b8ff; background: var(--se-panel);
}
.modern-subpage #content.se-page.se-dark a { color: var(--se-accent); }
@media (max-width: 540px) {
  .se-page .se-grid { grid-template-columns: 1fr; }
  .se-page .se-actions button { flex: 1 1 auto; }
  .se-page .se-actions label { width: 100%; }
}
@media print {
  body:has(.se-page) :is(.modern-site-header,#sidebar,#copyright,.se-no-print,.modern-mobile-dock,ins,iframe) { display: none !important; }
  body:has(.se-page) :is(#main,#main > .row > div,#content,.wrapper,#se-result) {
    width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important;
    background: white !important; color: black !important; box-shadow: none !important;
  }
  .modern-subpage #content.se-page:is(.se-page, .se-dark) { --se-panel: #fff; --se-ink: #111; --se-muted: #222; --se-soft: #f2f2f2; --se-accent: #123833; }
  .se-page .se-scroll { overflow: visible; }
  .se-page :is(th,td) { white-space: normal; overflow-wrap: anywhere; padding: 2px; font-size: 9px; }
  .se-page tr, .se-page .se-card { break-inside: avoid; }
}

.se-page .se-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }

.se-page .se-check { display: flex; gap: 8px; align-items: center; min-height: 44px; }
.modern-subpage #content.se-page .se-check input[type=checkbox] { appearance: auto; position: static; opacity: 1; width: 20px; height: 20px; margin: 0; flex: 0 0 20px; }
.se-page .se-coefficient-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(90px,1fr)); gap: 8px; }
.se-page #se-equation-inputs { display: grid; gap: 10px; margin: 14px 0; }
.se-page .se-answer-card { padding: 14px; background: var(--se-soft); border: 1px solid var(--se-line); border-radius: 8px; }
.se-page .se-answer-card > strong { font-size: 22px; }
.se-page :is(#se-steps,#se-original) p, .se-page #se-original li { white-space: pre-wrap; }
.se-page :is(#se-original,#se-steps,#se-checks,#se-problem) li { overflow-wrap: anywhere; margin-bottom: 10px; line-height: 1.7; }
.se-page #se-plot svg { display: block; width: 100%; height: auto; max-width: 560px; border: 1px solid var(--se-line); border-radius: 8px; }
.se-page .se-legend { list-style: none; padding: 0; font-size: 13px; margin-top: 10px; }
.se-page .se-legend li { overflow-wrap: anywhere; }
.se-page .se-legend li::before { content: ''; display: inline-block; width: 13px; height: 4px; background: var(--swatch); margin-right: 6px; vertical-align: middle; }
.se-page .se-rhs { border-inline-start: 3px solid var(--se-line); }
.se-page :is(#se-steps,#se-matrices,#se-checks,#se-graph) { margin-top: 24px; }
.se-page #se-status { overflow-wrap: anywhere; }
@media print { .se-page #se-plot svg { max-width: 350px; } .se-page .se-answer-card { break-inside: avoid; } }
@media print {
  body.se-print-practice #se-result, body:not(.se-print-practice) #se-practice { display: none !important; }
}

