/* Readable records first; material belongs to controls and the selected row. */
.archive-page { --archive-accent: var(--ui-accent, #d5bb8b); --archive-muted: var(--ui-muted, #a3adb9); }
.archive-page .archive-navigation { margin-left: auto; align-items: center; }
.archive-page .archive-navigation a[aria-current="page"] { color: var(--text); }
.archive-page .nav .back-to-matches { display: inline-flex; width: auto; height: auto; padding: 8px 0; margin: 0; font-size: 14px; line-height: 1.5; white-space: nowrap; letter-spacing: 0; }
.archive-page .nav #foxmeta-settings-toggle { width: 40px; height: 40px; }
.archive-page .nav #foxmeta-settings-toggle svg { width: 23px; height: 23px; }
.archive-page .archive-heading { align-items: flex-end; justify-content: space-between; }
.archive-description { color: var(--archive-muted); line-height: 1.7; margin: 14px 0 0; font-size: 14px; }
.archive-heading-meta { display: grid; gap: 9px; text-align: right; color: var(--archive-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.archive-heading-meta #archive-count { font-size: 16px; color: var(--text); }
.archive-tools { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; }
.archive-search { display: flex; align-items: center; gap: 11px; width: min(420px, 60%); min-width: 0; padding: 0 14px; min-height: 46px; border-radius: 12px; border: 1px solid #dce7f21b; background: #c7d9ed06; color: var(--archive-muted); }
.archive-search:focus-within { border-color: #d5bb8b80; box-shadow: 0 0 0 3px #d5bb8b0b; }
.archive-search input { min-width: 0; width: 100%; outline: none; border: 0; background: none; color: var(--text); padding: 12px 0; font-size: 14px; }
.archive-search input::placeholder { color: var(--archive-muted); }
.archive-search input::-webkit-search-cancel-button { appearance: none; }
.archive-search input:focus-visible { outline: none; }
.archive-search button { border: 0; background: none; color: var(--archive-muted); width: 28px; height: 28px; border-radius: 7px; font-size: 21px; padding: 0; flex: 0 0 28px; }
.archive-filter { display: flex; align-items: center; gap: 12px; }
.archive-filter label { color: var(--archive-muted); font-size: 13px; }
.archive-filter select { min-width: 148px; min-height: 44px; border: 1px solid #dce7f221; border-radius: 10px; background: #131c27; font-size: 14px; color: var(--text); padding: 10px 30px 10px 14px; }
.archive-list-meta { display: flex; align-items: center; justify-content: space-between; min-height: 39px; color: var(--archive-muted); font-size: 12px; }
.archive-list-meta[hidden] { display: none; }
.archive-list-meta button { border: 0; background: transparent; color: var(--archive-accent); padding: 8px 0 8px 14px; font-size: 12px; }
.archive-list-meta #archive-search-scope { margin-right: auto; }
.archive-list-meta #archive-reset { margin-left: auto; }
.archive-page .archive-group { margin: 27px 0 39px; }
.archive-group-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.archive-page .archive-group-heading h2 { font-size: 17px; font-weight: 600; margin: 0; }
.archive-group-heading span { color: var(--archive-muted); font-size: 12px; }
.archive-record { border-top: 1px solid #dce7f214; transition: background-color 160ms ease; border-radius: 0; }
.archive-record.is-open { background: transparent; box-shadow: none; }
.archive-record.is-open + .archive-record { border-top-color: transparent; }
.archive-page .archive-match { width: 100%; min-height: 84px; border: 0; background: none; text-align: left; padding: 17px 18px; grid-template-columns: 124px minmax(0,1fr) 72px minmax(0,1fr) 25px; gap: 20px; font: inherit; cursor: pointer; }
.archive-page .archive-match:active { transform: none; background: #dce7f20a; }
.archive-page .archive-match time { display: grid; gap: 5px; font-size: 13px; color: var(--archive-muted); font-weight: 400; }
.archive-match time small { font-size: 12px; color: var(--archive-muted); }
.archive-side { font-size: 16px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.archive-home { text-align: right; }
.archive-page .archive-score { font-size: 24px; font-weight: 550; letter-spacing: .02em; text-align: center; white-space: nowrap; }
.archive-page .archive-score.is-pending { font-size: 12px; font-weight: 400; letter-spacing: 0; }
.archive-chevron { color: var(--archive-muted); width: 20px; height: 20px; transition: transform 180ms cubic-bezier(.23,1,.32,1), color 140ms ease; }
.archive-record.is-open .archive-chevron { transform: rotate(180deg); color: var(--archive-accent); }
.archive-summary { height: 0; overflow: hidden; opacity: 0; transition: height 180ms var(--ui-ease-out, cubic-bezier(.23,1,.32,1)), opacity 120ms ease; }
.archive-record.is-open .archive-summary { opacity: 1; }
.archive-summary-inner { min-height: 0; overflow: hidden; }
.archive-summary-body { padding: 4px 26px 24px; }
.archive-summary-content { border-top: 1px solid var(--ui-border, #dce7f214); padding-top: 16px; }
.archive-summary-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.archive-detail-link { font-size: 13px; color: var(--archive-accent); display: inline-flex; align-items: center; gap: 7px; padding: 4px 0; }
.archive-detail-link span { font-size: 16px; }
.archive-snapshot { display: grid; grid-template-columns: .8fr .65fr .8fr 1fr 1fr 1.6fr; gap: 18px; margin: 0; }
.archive-snapshot div { min-width: 0; }
.archive-snapshot dt { font-size: 12px; color: var(--archive-muted); line-height: 1.4; margin-bottom: 9px; }
.archive-snapshot dd { font-size: 16px; margin: 0; color: var(--text); line-height: 1.5; font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.archive-snapshot .snapshot-model dd { color: var(--archive-accent); }
.archive-snapshot .snapshot-time dd { font-size: 13px; font-weight: 400; }
.archive-summary-message { padding: 4px 0 2px; margin: 0; min-height: 48px; font-size: 14px; color: var(--archive-muted); line-height: 1.7; }
.archive-summary-message button { border: 0; padding: 5px 10px; margin-left: 8px; border-radius: 6px; background: #dce7f20c; color: var(--archive-accent); font-size: 13px; }
.archive-page #archive-status { padding: 56px 20px; text-align: center; color: var(--archive-muted); font-size: 14px; line-height: 1.8; border: 1px dashed #dce7f21a; border-radius: 14px; margin-top: 18px; }
.archive-page #archive-status strong { color: var(--text); font-size: 17px; font-weight: 500; display: block; margin-bottom: 6px; }
.archive-page #archive-status p { margin: 0; }
.archive-page #archive-status button { display: block; margin: 18px auto 0; background: #dce7f20b; border: 1px solid #dce7f220; color: var(--text); padding: 10px 19px; font-size: 14px; border-radius: 9px; }
.archive-page #archive-more { min-height: 44px; font-size: 14px; padding: 10px 22px; border-radius: 10px; border-color: #dce7f221; }
.archive-page #archive-more span { margin-left: 12px; color: var(--archive-muted); }
.archive-record.is-keyboard .archive-summary, .archive-record.is-keyboard .archive-chevron { transition: none; }
@media (min-width: 721px) {
  .archive-page { background: var(--ui-bg,#0b1119); }
  .archive-page .shell { max-width: 1200px; padding: 0 48px; }
  .archive-page .nav { height: 76px; gap: 28px; border-bottom: 1px solid #dce7f211; }
  .archive-page .nav .brand { font-size: 20px; }
  .archive-page .nav nav { font-size: 14px; gap: 28px; }
  .archive-page .archive { padding-top: 38px; }
  .archive-page .archive-heading { margin-bottom: 16px; align-items: baseline; }
  .archive-page .archive-heading h1 { font-size: 34px; line-height: 1.25; letter-spacing: -.025em; font-weight: 600; }
  .archive-heading-meta { font-size: 13px; }
  .archive-tools { padding: 18px 0 14px; }
  .archive-search { width: min(400px, 60%); min-height: 44px; border-radius: 10px; background: #ffffff04; }
  .archive-search input { font-size: 15px; padding: 11px 0; }
  .archive-filter select { font-size: 14px; background: #17212c; }
  .archive-page .archive-group { margin: 26px 0 28px; }
  .archive-group-heading { margin-bottom: 10px; }
  .archive-page .archive-group-heading h2 { font-size: 17px; font-weight: 500; }
  .archive-page .archive-match { min-height: 82px; grid-template-columns: 124px minmax(0,1fr) 72px minmax(0,1fr); gap: 22px; padding: 16px 18px; border-radius: 10px; }
  .archive-page .archive-match time { font-size: 14px; }
  .archive-match time small { font-size: 13px; }
  .archive-side { font-size: 17px; font-weight: 400; }
  .archive-page .archive-score { font-size: 25px; font-weight: 500; }
  .archive-summary-body { padding: 0 24px 24px; }
  .archive-detail-link { min-height: 36px; align-items: center; font-size: 14px; padding: 6px 0; background: transparent; }
  .archive-snapshot { margin-top: 0; gap: 20px; }
  .archive-snapshot dt { font-size: 13px; margin-bottom: 7px; }
  .archive-snapshot dd { font-size: 17px; font-weight: 400; }
  .archive-snapshot .snapshot-odds dd { font-size: 24px; font-variant-numeric: tabular-nums; }
  .archive-snapshot .snapshot-kelly dd { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 10px; border-radius: 999px; background: #4ca47b; color: #fff; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
  .archive-snapshot .snapshot-kelly.is-positive dd { background: #ed5d5f; }
  .archive-snapshot .snapshot-kelly.is-negative dd { background: #4ca47b; }
  .archive-snapshot .snapshot-model dd { color: #ed6a68; }
  .archive-score,.archive-snapshot dd,.archive-page .archive-match time { font-family:"DM Sans","Avenir Next","Segoe UI Variable",sans-serif; font-variant-numeric:tabular-nums; }
  .archive-page #archive-status { border-style: solid; }
  html, body, body * { scrollbar-width: none; }
  html::-webkit-scrollbar, body::-webkit-scrollbar, body *::-webkit-scrollbar { display: none; width: 0; height: 0; }
}
@media (hover:hover) and (pointer:fine) {
  .archive-record:not(.is-open):hover { background: #dce7f204; }
  .archive-record:hover .archive-chevron { color: var(--text); }
  .archive-search button:hover, .archive-page #archive-more:hover { background: #dce7f20c; }
  .archive-detail-link:hover { color: #efe1c4; }
}
@media (max-width:720px) {
  .archive-page .nav { gap: 18px; }
  .archive-page .nav nav { gap: 16px; }
  .archive-page .archive-heading { gap: 14px; }
  .archive-heading-meta { display: none; }
  .archive-tools { gap: 12px; align-items: stretch; }
  .archive-search { width: 100%; }
  .archive-filter label { display: none; }
  .archive-filter select { min-width: 90px; width: 110px; }
  .archive-page .archive-match { grid-template-columns: minmax(0,1fr) 54px minmax(0,1fr) 16px; padding: 14px 10px; gap: 12px; }
  .archive-page .archive-match time { grid-column: 1/-1; display: flex; gap: 9px; }
  .archive-side { font-size: 14px; }
  .archive-page .archive-score { font-size: 20px; }
  .archive-summary-body { padding: 2px 16px 20px; }
  .archive-snapshot { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px 12px; }
}
@media (prefers-reduced-motion:reduce) {
  .archive-summary, .archive-chevron, .archive-record { transition: none; }
  .archive-page { scroll-behavior: auto; }
}
@media (prefers-contrast:more) {
  .archive-page { --archive-muted: #c5cdd5; }
  .archive-record, .archive-search, .archive-filter select { border-color: #dce7f260; }
}
