/* flot.com — restyle of legacy static content pages.
   Applies to a wrapper: <div class="legacy prose">…untouched legacy HTML…</div>
   No per-page HTML edits required. Requires :has() support. */

.legacy { font: 400 16.5px/1.9 'Golos Text', system-ui, sans-serif; color: #737d88; max-width: 78ch; }
  .legacy::after { content: ''; display: block; clear: both; }
  .legacy.prose { font-size: clamp(16px,1.6cqw,18.5px); line-height: 1.68; color: #22303c; }
  .legacy h1 { margin: 0 0 18px; padding-bottom: 18px; border-bottom: 1px solid #c3d2e0; font: 600 clamp(28px,3.2cqw,40px)/1.14 'Source Serif 4', Georgia, serif; color: #0b1f3a; }
  .legacy h2 { margin: 40px 0 8px !important; padding-top: 16px; border-top: 2px solid #0b1f3a; font: 600 clamp(21px,2.3cqw,28px)/1.2 'Source Serif 4', Georgia, serif; color: #0b1f3a; }
  .legacy h3 { margin: 34px 0 10px; font: 600 11px 'Golos Text', sans-serif; letter-spacing: .18em; text-transform: uppercase; color: #a4231b; }
  .legacy h4 { margin: 30px 0 6px; padding-bottom: 9px; border-bottom: 1px solid #c3d2e0; font: 600 clamp(19px,2cqw,24px)/1.25 'Source Serif 4', Georgia, serif; color: #0b1f3a; }
  .legacy h5 { margin: 26px 0 2px; font: 600 13px 'Golos Text', sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #4c5560; }
  .legacy h2 a, .legacy h3 a, .legacy h4 a, .legacy h5 a { color: inherit; }
  .legacy a { color: #0b1f3a; }
  .legacy a:hover { color: #a4231b; text-decoration: underline; text-underline-offset: 3px; }
  .legacy br + br { display: block; }
  .legacy br + br::before { content: ''; display: block; height: 12px; }
  /* layout tables → jump-link chips */
  .legacy table:has(tr + tr) { display: block; overflow-x: auto; border-collapse: collapse; margin: 18px 0 26px; font: 400 14px/1.5 'Golos Text', sans-serif; color: #22303c; }
  .legacy table:has(tr + tr) td, .legacy table:has(tr + tr) th { border: 1px solid #c3d2e0; padding: 9px 12px !important; vertical-align: top; background: #fff; }
  .legacy table:has(tr + tr) tr:first-child td, .legacy table:has(tr + tr) th { background: #dce6f0; font-weight: 600; color: #0b1f3a; }
  .legacy > table:has(> tbody > tr:only-child):has(td + td) { display: block; width: auto !important; border: 0; border-collapse: collapse; margin: 24px 0; }
  .legacy > table:has(> tbody > tr:only-child):has(td + td) tbody, .legacy > table:has(> tbody > tr:only-child):has(td + td) tr, .legacy > table:has(> tbody > tr:only-child):has(td + td) td { display: block; width: auto !important; padding: 0 !important; border: 0; }
  /* single-cell tables used as floated figures */
  .legacy > table:not(:has(td + td)) { float: left; width: 300px !important; max-width: 42%; margin: 6px 30px 18px 0; border-collapse: collapse; }
  .legacy > table:not(:has(td + td)) td { padding: 0 !important; }
  .legacy > table:not(:has(td + td)) td > a { display: block; }
  .legacy > table:not(:has(td + td)) img { display: block; width: 100% !important; height: auto !important; min-height: 200px; margin: 0 !important; background: #dce6f0; }
  .legacy > table:not(:has(td + td)) br { display: none; }
  .legacy small { display: block; margin-top: 9px; font: 400 12.5px/1.45 'Golos Text', sans-serif; color: #7b838d; }
  .legacy small center { text-align: left; }
  .legacy div.author { margin: 0 0 26px; padding: 0 0 18px; border-bottom: 1px solid #c3d2e0; font: 400 14px/1.6 'Golos Text', sans-serif; color: #4c5560; }
  .legacy > table img:not([width]) { display: none; }
  .legacy > table:has(> tbody > tr:only-child):has(td + td) td:first-child { display: none; }
  .legacy > table:has(> tbody > tr:only-child):has(td + td) td a { display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; background: #fff; border: 1px solid #c3d2e0; }
  .legacy > table:has(> tbody > tr:only-child):has(td + td) td a:hover { border-color: #0b1f3a; text-decoration: none; }
  .legacy > table:has(> tbody > tr:only-child):has(td + td) td a::before { content: '↓'; font: 400 13px 'Golos Text', sans-serif; color: #a4231b; }
  .legacy > table:has(> tbody > tr:only-child) b { font: 600 11px 'Golos Text', sans-serif; letter-spacing: .18em; text-transform: uppercase; color: #0b1f3a; }
  /* the one <b> that wraps a br-separated run of jump links → list */
  .legacy > b:has(> a) { display: block; margin: 0 0 12px; font-weight: 400; }
  .legacy > b:has(> a) > a { display: block; font: 400 16px/1.35 'Golos Text', sans-serif; padding: 12px 0; border-bottom: 1px solid #d6e0ea; max-width: 68ch; }
  .legacy > b:has(> a) > a:hover { padding-left: 6px; text-decoration: none; }
  .legacy > b:has(> a) > br { display: none; }
  .legacy ul, .legacy ol { margin: 14px 0 20px; padding-left: 22px; max-width: 70ch; }
  .legacy li { margin: 0 0 9px; }
  .legacy li::marker { color: #a4231b; }
  .legacy center { text-align: left; }
  .legacy center + center { margin: 0 0 6px; font: 500 14.5px/1.45 'Golos Text', sans-serif; color: #4c5560; }
  .legacy center b { display: block; margin: 26px 0 4px; font: 600 11px 'Golos Text', sans-serif; letter-spacing: .18em; text-transform: uppercase; color: #a4231b; text-align: left; }
  .legacy font { font-size: inherit !important; font-family: inherit !important; color: inherit !important; }
  .legacy img { max-width: 100%; height: auto; }
  .legacy [style*="width"] { max-width: 100% !important; }
  @container (max-width: 640px) {
    .legacy > table:not(:has(td + td)) { float: none; width: 100% !important; max-width: 100%; margin: 18px 0 22px; }
    .legacy > b > a { font-size: 15.5px; }
  }
  @media (max-width: 640px) {
    .legacy > table:not(:has(td + td)) { float: none; width: 100% !important; max-width: 100%; margin: 18px 0 22px; }
  }
