#result,#params{min-height:7rem}

/* The tool surface follows the page typography. Original preview areas keep their colours. */
body:has(.legacy) {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  padding: 0;
  display: block;
  margin: 0;
}
.masthead, main, footer { max-width: 73rem; }
.masthead { padding-inline: .1rem; }
.intro { padding-top: clamp(1.5rem, 5vw, 3.55rem); }
.intro h1 {
  color: var(--ink);
  margin: 0 0 .6rem;
  font-size: clamp(2rem, 6vw, 4.35rem);
  font-weight: 790;
  text-align: start;
  line-height: 1.02;
}
.intro p { text-align: start; }
.legacy { width: 100%; min-width: 0; }
.legacy > .container {
  background: var(--panel);
  color: var(--ink);
  border-radius: .85rem;
  border: 1px solid var(--line);
  box-shadow: 0 8px 26px #182b2110;
  margin: 0;
  padding: clamp(.85rem, 3vw, 2rem);
  width: 100%;
  max-width: none;
  min-width: 0;
}
.legacy :is(h2,h3,h4) { color: var(--ink); line-height: 1.22; overflow-wrap: anywhere; }
.legacy :is(label,legend) { color: var(--ink); }
.legacy :is(p,blockquote,summary,td,th) { overflow-wrap: anywhere; }
.legacy button {
  background: var(--action);
  color: #fff;
  border-radius: .5rem;
  box-shadow: none;
  min-height: 2.75rem;
  transition: filter .12s ease-out;
}
.legacy button:hover:not(:disabled) { transform: none; filter: brightness(1.15); }
.legacy button:disabled { cursor: default; opacity: .55; }
.legacy .secondary { color: var(--action); background: #f6f8f3; border: 1px solid #8c9f91; }
.legacy :is(input,select,textarea) {
  border: 1px solid #85998d;
  border-radius: .42rem;
  max-width: 100%;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}
.legacy :is(input[type=checkbox],input[type=radio]) { width: auto; }
.legacy textarea, .legacy pre, .legacy code, .legacy .code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .96rem;
}
.legacy :is(pre,.result,.output,.tool-output,.preview,.tool-entry) { min-width: 0; overflow-wrap: anywhere; }
.legacy pre { max-width: 100%; overflow: auto; }
.legacy :is(canvas,svg,video,img) { max-width: 100%; }
.legacy :is(.tool-split,.tool-layout) > * { min-width: 0; }
.legacy :is(.tool-actions,.button-group) { flex-wrap: wrap; }
.legacy [data-scroll-table] { max-width: 100%; overflow-x: auto; }
.legacy :focus-visible { outline: 3px solid #245da7; outline-offset: 2px; }
.simple-docs { max-width: 55rem; }
@media (max-width: 550px) {
  .masthead,.intro, main, footer { min-width: 0; }
  .legacy .container { max-width: 100%; padding-inline: .75rem; }
  .legacy :is(.tool-split,.tool-layout,.two-column,.two-col,.diff-container,.input-area,.split) { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .legacy > .container { padding: 0; box-shadow: none; border: 0; }
}
