/* Racine Football History — team colors: red #CC3333, black. */
.rfh { --rfh-red: #cc3333; --rfh-ink: #1d1d1d; --rfh-line: #ddd; --rfh-soft: #f6f6f6; font-size: 15px; line-height: 1.45; color: var(--rfh-ink); }
.rfh *, .rfh *::before, .rfh *::after { box-sizing: border-box; }

/* Filters */
.rfh-filters { background: var(--rfh-soft); border: 1px solid var(--rfh-line); border-top: 4px solid var(--rfh-red); padding: 14px 16px; margin: 0 0 16px; }
.rfh-filter-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.rfh-filters label, .rfh-filters legend { display: flex; flex-direction: column; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; gap: 4px; }
.rfh-filters fieldset { border: 0; margin: 0; padding: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rfh-filters legend { flex-basis: 100%; margin-bottom: 4px; padding: 0; }
.rfh-filters select, .rfh-filters input { font-size: 14px; padding: 6px 8px; border: 1px solid #bbb; border-radius: 3px; background: #fff; min-height: 34px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.rfh-filters fieldset input { width: 84px; }
.rfh-grow { flex: 1 1 220px; }
.rfh-grow input { width: 100%; }
.rfh-advanced { margin: 12px 0 0; }
.rfh-advanced summary { cursor: pointer; font-weight: 600; color: var(--rfh-red); margin-bottom: 10px; }
.rfh-filter-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rfh-line); }
.rfh-btn { background: var(--rfh-red); color: #fff; border: 0; padding: 8px 22px; min-height: 34px; font-weight: 700; border-radius: 3px; cursor: pointer; }
.rfh-btn:hover, .rfh-btn:focus { background: #000; }
.rfh-reset { align-self: center; font-size: 13px; }

/* Summary + season card */
.rfh-season-card { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 14px; background: #000; color: #fff; margin-bottom: 8px; }
.rfh-season-card strong { color: #fff; }
.rfh-summary { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; padding: 8px 2px; border-bottom: 2px solid var(--rfh-ink); margin-bottom: 0; font-size: 14px; }
.rfh-csv { margin-left: auto; font-size: 13px; }

/* Table */
.rfh-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rfh-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; }
.rfh-table th, .rfh-table td { padding: 7px 10px; border-bottom: 1px solid var(--rfh-line); text-align: left; vertical-align: top; white-space: nowrap; }
.rfh-table td.rfh-notes { white-space: normal; color: #555; font-size: 13px; min-width: 140px; }
.rfh-table th { background: var(--rfh-red); color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.rfh-table th a { color: #fff; text-decoration: none; }
.rfh-table th a:hover, .rfh-table th a:focus { text-decoration: underline; }
.rfh-table .num { text-align: center; font-variant-numeric: tabular-nums; }
.rfh-table tbody tr:hover { background: #fdf3f3; }
.rfh-table tr.rfh-home td.rfh-opp { font-weight: 700; } /* bold opponent = home game, as on the old site */
.rfh-table td a { color: inherit; text-decoration: none; border-bottom: 1px dotted #999; }
.rfh-table td a:hover { color: var(--rfh-red); }
.rfh-result { display: inline-block; min-width: 1.8em; text-align: center; font-weight: 700; border-radius: 3px; padding: 0 4px; }
.rfh-win { background: #e3f2e5; color: #1b5e20; }
.rfh-loss { background: #fbe4e4; color: #8e1c1c; }
.rfh-tie { background: #eee; color: #444; }
.rfh-none { color: #888; }
.rfh-season-note { font-style: italic; opacity: .85; }
.rfh-empty { padding: 20px 0; }

.rfh-pages { display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0; }
.rfh-pages a, .rfh-pages span { padding: 4px 10px; border: 1px solid var(--rfh-line); text-decoration: none; }
.rfh-pages .current { background: var(--rfh-red); color: #fff; border-color: var(--rfh-red); }

/* Entry form (front end + admin) */
.rfh-game-form { max-width: 820px; }
.rfh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 16px; }
.rfh-grid p { margin: 0 0 10px; }
.rfh-grid .rfh-wide { grid-column: 1 / -1; }
.rfh-grid label { display: block; font-weight: 600; margin-bottom: 4px; }
.rfh-grid input[type=text], .rfh-grid input[type=number], .rfh-grid select, .rfh-grid textarea { width: 100%; max-width: 100%; padding: 6px 8px; min-height: 34px; font-size: 14px; }
.rfh-grid .rfh-checks { display: flex; gap: 18px; align-items: center; padding-top: 22px; }
.rfh-grid .rfh-checks label { font-weight: 400; display: inline-flex; gap: 6px; align-items: center; }
.rfh-help { color: #666; font-size: 13px; }
.rfh-notice-success { border-left: 4px solid #2e7d32; background: #eef7ee; padding: 1px 12px; }
.rfh-notice-error { border-left: 4px solid var(--rfh-red); background: #fbeaea; padding: 1px 12px; }

/* Admin */
.rfh-admin .rfh-howto { background: #fff; border: 1px solid #c3c4c7; border-left: 4px solid #cc3333; padding: 4px 12px; margin: 12px 0; }
.rfh-admin-filters { margin: 12px 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rfh-count { color: #666; margin-left: 8px; }
.rfh-admin-table td { vertical-align: middle; }
.rfh-row-actions { white-space: nowrap; }
.rfh-delete { color: #b32d2e; }

.rfh-table td.rfh-edit a { font-size: 12px; border: 1px solid #ccc; border-bottom-color: #ccc; padding: 1px 8px; border-radius: 3px; }
.rfh-table td.rfh-edit a:hover { background: var(--rfh-red); color: #fff; border-color: var(--rfh-red); }
.rfh .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rfh-grid small.rfh-help { display: block; margin-top: 3px; font-size: 12px; }

/* Clickable scores */
.rfh-table td.rfh-score a { display: inline-block; min-width: 2em; text-align: center; color: inherit; font-weight: 700; border-bottom: 0; text-decoration: none; }
.rfh-table td.rfh-score a:hover, .rfh-table td.rfh-score a:focus { color: var(--rfh-red); }
.rfh-table td.rfh-venue { white-space: normal; min-width: 150px; font-size: 13px; }
.rfh-table tr.rfh-canceled-row td { background: #fbf4e4; font-style: italic; color: #6b4a00; }
.rfh-canceled-msg { font-size: 17px; font-style: italic; }

/* Game page */
.rfh-back { margin: 0 0 12px; }
.rfh-game-head { border-top: 4px solid var(--rfh-red); background: var(--rfh-soft); padding: 14px 18px; margin-bottom: 18px; }
.rfh-game-kicker { margin: 0; text-transform: uppercase; letter-spacing: .05em; font-size: 12px; font-weight: 700; color: var(--rfh-red); }
.rfh-game-title { margin: 4px 0 8px; font-size: 26px; line-height: 1.2; }
.rfh-game-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; }
.rfh-game-subnote { margin: 8px 0 0; color: #555; font-size: 14px; }
.rfh-section-title { font-size: 15px; letter-spacing: .06em; text-transform: uppercase; border-bottom: 2px solid var(--rfh-ink); padding-bottom: 4px; margin: 22px 0 0; }
.rfh-linescore { max-width: 640px; }
.rfh-linescore th[scope=row] { font-weight: 700; white-space: normal; }
.rfh-linescore td.num, .rfh-linescore th.num { text-align: center; width: 62px; }
.rfh-linescore .rfh-final { background: #f1e3e3; font-weight: 800; font-size: 16px; }
.rfh-linescore thead .rfh-final { background: #000; }
.rfh-linescore input.rfh-q { width: 52px; text-align: center; padding: 4px; font-size: 14px; border: 1px solid #bbb; border-radius: 3px; }
.rfh-game-notes { padding: 10px 0; }
.rfh-game-notes-input { width: 100%; max-width: 760px; margin-top: 10px; font: inherit; padding: 8px; }
.rfh-game-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.rfh-game-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 10px; border-top: 1px solid var(--rfh-line); font-size: 14px; }
.rfh-linescore tbody th[scope=row] { background: #fff; color: var(--rfh-ink); text-transform: none; letter-spacing: 0; font-size: 15px; vertical-align: middle; }
.rfh-linescore td { vertical-align: middle; }

/* Streak column */
.rfh-table td.rfh-streak, .rfh-table th.rfh-streak-col { text-align: center; }
.rfh-table td.rfh-streak { font-weight: 700; font-variant-numeric: tabular-nums; }
.rfh-table td.rfh-streak-w { color: #1b5e20; }
.rfh-table td.rfh-streak-l { color: #8e1c1c; }
.rfh-table th.rfh-streak-col abbr { text-decoration: none; border: 0; cursor: help; }

/* Result column */
.rfh-table td.rfh-result-col, .rfh-table th.rfh-result-col { text-align: center; }

/* View tabs */
.rfh-tabs { display: flex; gap: 0; margin: 0 0 12px; border-bottom: 2px solid var(--rfh-red); }
.rfh-tabs a { padding: 8px 16px; text-decoration: none; color: var(--rfh-ink); font-weight: 700; font-size: 14px; border: 1px solid transparent; border-bottom: 0; }
.rfh-tabs a.current { background: var(--rfh-red); color: #fff; }
.rfh-tabs a:not(.current):hover { color: var(--rfh-red); }

/* Overall / League stat panel */
.rfh-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; margin: 0 0 6px; }
.rfh-stat-block { border: 1px solid var(--rfh-line); border-top: 3px solid var(--rfh-ink); padding: 8px 12px 10px; }
.rfh-stat-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--rfh-red); margin-bottom: 4px; }
.rfh-stat-block dl { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; }
.rfh-stat-block dl div { display: flex; flex-direction: column; }
.rfh-stat-block dt { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: #666; }
.rfh-stat-block dd { margin: 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rfh-summary-note { color: #666; font-size: 12px; }

/* Canceled game tag */
.rfh-canceled-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #6b4a00; background: #fbf4e4; padding: 1px 6px; border-radius: 3px; }

/* Year-by-year records */
.rfh-records th, .rfh-records td { text-align: center; }
.rfh-records td:first-child, .rfh-records th:first-child { text-align: left; }
.rfh-records .rfh-group-row th { background: #000; }
.rfh-records .rfh-group-start { border-left: 2px solid #fff; }
.rfh-records tbody .rfh-group-start, .rfh-records tfoot .rfh-group-start { border-left: 2px solid var(--rfh-line); }
.rfh-records .rfh-rec { font-weight: 700; }
.rfh-records tfoot th, .rfh-records tfoot td { background: var(--rfh-soft); font-weight: 700; border-top: 2px solid var(--rfh-ink); text-align: center; }
.rfh-records tfoot th { text-align: left; color: var(--rfh-ink); text-transform: none; letter-spacing: 0; font-size: 14px; }
.rfh-records tfoot .rfh-subtotal th, .rfh-records tfoot .rfh-subtotal td { font-weight: 600; border-top: 1px solid var(--rfh-line); }
.rfh-records .rfh-team { text-align: left; }

/* Longest streaks */
.rfh-filters-compact { padding: 10px 14px; }
.rfh-current-streaks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 10px 0 4px; }
.rfh-current-value { font-size: 30px; font-weight: 800; line-height: 1.1; }
.rfh-current-value.rfh-streak-w { color: #1b5e20; } .rfh-current-value.rfh-streak-l { color: #8e1c1c; }
.rfh-current-since { font-size: 13px; color: #555; }
.rfh-streak-table td { white-space: normal; }
.rfh-streak-table td.num, .rfh-streak-table th.num { text-align: center; width: 60px; }
.rfh-streak-table td.rfh-streak-w { color: #1b5e20; font-weight: 800; } .rfh-streak-table td.rfh-streak-l { color: #8e1c1c; font-weight: 800; }
.rfh-active-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; color: #1b5e20; background: #e3f2e5; padding: 1px 6px; border-radius: 3px; }

/* Coaches */
.rfh-coaches tbody th.rfh-coach-name { background: #fff; color: var(--rfh-ink); text-transform: none; letter-spacing: 0; font-size: 14px; text-align: left; white-space: nowrap; }
.rfh-coaches td.rfh-team { white-space: normal; min-width: 110px; font-size: 13px; }
.rfh-coaches .rfh-count { color: #888; }
.rfh-coaches tr.rfh-unlisted th, .rfh-coaches tr.rfh-unlisted td { font-style: italic; color: #666; }

/* Separate W / L / T columns + sortable headings in summary tables */
.rfh-records { font-size: 13px; }
.rfh-records th, .rfh-records td { padding: 7px 7px; }
.rfh-records td.rfh-wlt { font-weight: 700; min-width: 26px; }
.rfh-records thead th a { color: #fff; text-decoration: none; display: block; }
.rfh-records thead th a:hover, .rfh-records thead th a:focus { text-decoration: underline; }
.rfh-records thead th[aria-sort="ascending"], .rfh-records thead th[aria-sort="descending"] { background: #a82424; }
