.history-doc { --fh-gap: clamp(12px, 2.6vw, 24px); }
.fh-section { margin-block: 32px; scroll-margin-top: 90px; }
.fh-section .lb-h2-row { margin-bottom: 12px; }
.fh-section .lb-h2-row[id] { scroll-margin-top: 90px; }
.fh-actions, .fh-pagination, .fh-sources { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.fh-actions { margin-block: 14px; }
.fh-actions:last-child { margin-bottom: 0; }
.fh-sources { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.fh-pagination { justify-content: center; margin-block: 20px; }
.fh-search-grid, .fh-ea-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--fh-gap); }
.fh-search, .fh-model { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.fh-search { margin-bottom: 18px; }
.fh-search-grid .fh-search { margin-bottom: 0; }
.fh-search label { min-width: 0; flex: 1 1 170px; display: grid; gap: 5px; }
.fh-search input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding-inline: 12px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}
.fh-search input::placeholder { color: var(--muted); }
.fh-search :is(input, select):focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.fh-search select, .fh-model select { min-height: 44px; }
.fh-search .bd-btn, .fh-model .bd-btn { min-height: 44px; }
.fh-card-grid, .fh-event-card, ul.fh-ea-grid { list-style: none; padding: 0; margin: 0; }
.fh-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.fh-card-grid > li { min-width: 0; }
.history-doc a.fh-card {
  height: 100%;
  min-height: 62px;
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line-soft);
  text-decoration: none;
}
.history-doc a.fh-card:has(.lb-pt) { grid-template-columns: auto minmax(0, 1fr) auto; }
.history-doc a.fh-card:hover, .history-doc a.fh-card:focus-visible { border-color: var(--red-light); }
.fh-card-body { min-width: 0; display: grid; gap: 2px; }
.fh-card strong { overflow-wrap: anywhere; line-height: 1.3; }
.fh-card-body > span, .fh-event-result > span { color: var(--muted); font-size: 0.875rem; }
.fh-arrow { color: var(--muted); font-size: 1.25rem; }
.fh-table-wrap { margin-top: 12px; }
.fh-table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
.fh-table :is(th, td) { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.fh-table th { color: var(--muted); font: 600 12px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .045em; }
.fh-table td { vertical-align: middle; font-size: 0.9375rem; overflow-wrap: anywhere; }
.fh-table tr:nth-child(even) { background: color-mix(in srgb, var(--panel) 88%, var(--line-soft)); }
.fh-table td:first-child { font-weight: 600; }
.fh-cell-label, .fh-log-mobile { display: none; }
.fh-log-date, .fh-log-round, .fh-log-time { white-space: nowrap; }
.fh-log-result a { display: inline-block; text-decoration: none; }
.fh-log-result a:hover .lb-mark { box-shadow: 0 0 0 1px currentColor; }
.fh-event-card { display: grid; gap: 8px; }
.fh-event-bout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.25fr) auto; align-items: center; gap: 14px; padding-block: 12px; }
.fh-event-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; font-weight: 700; overflow-wrap: anywhere; line-height: 1.3; }
.fh-event-pair > div:last-child { text-align: right; }
.fh-event-result { display: grid; gap: 3px; }
.fh-event-result strong { font-size: .9375rem; color: var(--text); }
.fh-career-hero { display: flex; align-items: center; gap: clamp(12px, 3vw, 24px); }
.fh-career-quick { min-width: 0; flex: 1; }
.fh-career-numbers { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 32px; }
.fh-career-model { display: grid; gap: 5px; }
.fh-career-hero p { margin: 7px 0 14px; color: var(--muted); }
.fh-record-number { display: block; margin-top: 5px; color: var(--gold); font: 400 clamp(18px, 3.2vw, 28px)/1.35 var(--pixel); overflow-wrap: anywhere; }
.fh-versus {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid var(--line);
  margin-block: 14px;
  background: linear-gradient(90deg, #2b171c 0 50%, #14232c 50%);
}
.fh-corner { display: flex; align-items: center; min-width: 0; gap: clamp(10px, 2vw, 18px); padding: clamp(12px, 3vw, 28px); }
.fh-corner.red { border-top: 3px solid var(--red-light); }
.fh-corner.blue { border-top: 3px solid #82c6f1; flex-direction: row-reverse; text-align: right; }
.fh-corner-text { min-width: 0; }
.history-doc .fh-corner h2, .history-doc .fh-rating h2 { margin: 0 0 9px; font: 700 clamp(18px, 3vw, 24px)/1.2 var(--sans); overflow-wrap: anywhere; }
.fh-corner.blue .lb-kv { justify-content: flex-end; }
.fh-vs-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 7px;
  color: var(--gold);
  background: #151517;
  border: 1px solid var(--line);
  font: 400 10px/1 var(--pixel);
}
.fh-bout-outcome { display: flex; align-items: baseline; gap: 10px 28px; flex-wrap: wrap; }
.fh-bout-outcome > strong { color: var(--gold); font-size: 1.25rem; }
.fh-play p { margin-block: 4px 14px; }
.fh-model { margin-top: 12px; }
.fh-model .lb-select { max-width: 100%; }
.fh-disclosure { margin-top: 12px; border-top: 1px solid var(--line-soft); }
.fh-disclosure > summary { padding: 10px 0; cursor: pointer; font-weight: 600; }
.fh-disclosure > .lb-kv { margin: 8px 0 12px; }
.fh-ratings-form label.lb-select { flex: 0 1 250px; }
.fh-rating-count { margin: 10px 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.fh-rating-count p { margin: 0; color: var(--muted); font-size: .875rem; }
.fh-ea-grid { align-items: start; }
.fh-rating { scroll-margin-top: 90px; }
.fh-rating:target { outline: 2px solid var(--gold); }
.fh-rating-head { display: flex; gap: 10px; align-items: flex-start; }
.history-doc .fh-rating h2 { margin-bottom: 2px; font-size: 1.2rem; }
.fh-rating-head p, .fh-rating-reveal p { margin: 0; }
.fh-rating-head > .lb-overall { margin-left: auto; text-align: right; }
.fh-rating-reveal { margin-top: 12px; }
.fh-rating-values { margin-top: 6px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 7.5em), 1fr)); gap: 6px 10px; }
.fh-rating-values dt { font-size: 11px; line-height: 1.35; }
.fh-perks { display: flex; gap: 5px; flex-wrap: wrap; padding: 0; list-style: none; }
.fh-perks li { padding: 2px 5px; border: 1px solid var(--line-soft); font-size: .75rem; }
.fh-portrait-art.pt-face { height: 42px; overflow: hidden; }
@media (max-width: 750px) {
  .fh-search-grid, .fh-ea-grid { grid-template-columns: minmax(0, 1fr); }
  .fh-career-hero { align-items: flex-start; }
  .fh-career-numbers { column-gap: 18px; }
  .fh-event-bout { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .fh-event-pair { grid-column: 1 / -1; border-bottom: 1px solid var(--line-soft); padding-bottom: 10px; }
  .fh-corner, .fh-corner.blue { flex-direction: column; text-align: center; align-items: center; }
  .fh-corner .lb-kv, .fh-corner.blue .lb-kv { display: grid; justify-content: center; gap: 8px; }
  .fh-vs-mark { top: 58px; }
  .fh-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .fh-table { display: block; border: 0; background: transparent; }
  .fh-table tbody { display: grid; gap: 7px; }
  .fh-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line-soft); background: var(--panel); }
  .fh-table td { border: 0; padding: 7px 9px; }
  .fh-table td:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--line-soft); }
  .fh-cell-label { display: block; margin-bottom: 2px; color: var(--muted); font: 600 10px/1.35 var(--mono); text-transform: uppercase; }
  .fh-stats tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fh-log tr { grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 7px; padding: 8px 10px; }
  .fh-log td, .fh-log td:first-child { border: 0; padding: 3px 0; }
  .fh-log td.fh-log-date { grid-column: 3; grid-row: 1; align-self: center; font-weight: 400; font-size: .8rem; color: var(--muted); }
  .fh-log-result { grid-row: 1; grid-column: 1; }
  .fh-log-opponent { grid-row: 1; grid-column: 2; font-weight: 600; }
  .fh-log-method { grid-row: 2; grid-column: 2 / -1; }
  .fh-log-event { grid-row: 3; grid-column: 2 / -1; }
  .fh-log-source { grid-row: 4; grid-column: 2 / -1; font-size: .8rem; }
  .fh-log-source:empty { display: none; }
  .fh-log-round, .fh-log-time { display: none; }
  .fh-log-mobile:not(:empty) { display: inline; margin-left: 6px; color: var(--muted); white-space: nowrap; }
}
@media (max-width: 365px) {
  .fh-table tr:not(.fh-log tr) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fh-event-bout .bd-btn { padding-inline: 9px; }
}
.lb-root.bd-root .fh-play p { margin-block: 4px 14px; }
.lb-root.bd-root .fh-career-hero p { margin: 7px 0 14px; }
.lb-root.bd-root .fh-section > p { margin-block: 0 12px; }
