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