/* ── SACFD Prototype Styles ── */
@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@400;500;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Libre Franklin', 'Franklin Gothic Medium', Arial, sans-serif;
    font-weight: 400;
    color: #000;
    background-color: #f5f0e1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
    font-size: 17px;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6,
.sacfd-header__title {
    font-family: 'Libre Franklin', 'Franklin Gothic Medium', Arial, sans-serif;
    font-weight: 700;
}

a {
    color: #1a3a6b;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ── Site Header ── */
.sacfd-header {
    background: #1a1a2e;
    color: #fff;
    padding: 16px 0;
    border-bottom: 4px solid #cc0000;
}
.sacfd-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.sacfd-header__title {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.sacfd-header__title a {
    color: #f5c518;
    text-decoration: none;
}
.sacfd-header__title a:hover {
    text-decoration: none;
    opacity: 0.9;
}
.sacfd-header__nav {
    display: flex;
    gap: 20px;
    margin-left: auto;
}
.sacfd-header__nav a {
    color: #fff;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sacfd-header__nav a:hover {
    color: #f5c518;
    text-decoration: none;
}

/* ── Breadcrumbs ── */
.sacfd-breadcrumbs-bar {
    background: #ece6d2;
    border-bottom: 1px solid #d5cdb8;
    margin-bottom: 32px;
}
.sacfd-breadcrumbs {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 24px;
    font-size: 15px;
    color: #666;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.sacfd-breadcrumbs__trail {
    flex-shrink: 0;
}

/* ── Live Search ── */
.sacfd-search {
    position: relative;
    flex-shrink: 0;
    width: 360px;
}
.sacfd-search__input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d5cdb8;
    border-radius: 4px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.sacfd-search__input::placeholder {
    color: #aaa;
}
.sacfd-search__input:focus {
    border-color: #1a3a6b;
    box-shadow: 0 0 0 2px rgba(26,58,107,0.12);
}
.sacfd-search__results {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 420px;
    max-height: 400px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d5cdb8;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1000;
}
.sacfd-search__results--open {
    display: block;
}
.sacfd-search__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #f0ebe0;
    transition: background 0.1s;
}
.sacfd-search__item:last-child {
    border-bottom: none;
}
.sacfd-search__item:hover,
.sacfd-search__item--active {
    background: #f5f0e1;
    text-decoration: none;
}
.sacfd-search__item-title {
    font-size: 15px;
    color: #000;
}
.sacfd-search__item-title mark {
    background: #fce8a6;
    color: #000;
    border-radius: 2px;
    padding: 0 1px;
}
.sacfd-search__item-type {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    background: #f0ebe0;
    padding: 2px 8px;
    border-radius: 3px;
}
.sacfd-search__empty {
    padding: 14px;
    color: #999;
    font-size: 14px;
    font-style: italic;
    text-align: center;
}

@media (max-width: 640px) {
    .sacfd-breadcrumbs {
        flex-wrap: wrap;
    }
    .sacfd-search {
        width: 100%;
    }
    .sacfd-search__results {
        width: 100%;
    }
}
.sacfd-breadcrumbs a {
    color: #1a3a6b;
}
.sacfd-breadcrumbs .sep {
    margin: 0 6px;
    color: #999;
}

/* ── Site Footer ── */
.sacfd-footer {
    background: #1a1a2e;
    color: #aaa;
    padding: 24px 0;
    text-align: center;
    font-size: 15px;
    margin-top: auto;
    border-top: 4px solid #cc0000;
}
.sacfd-footer a {
    color: #f5c518;
}

/* ── Shared Layout ── */
.sacfd-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Hero Image ── */
.sacfd-hero {
    max-width: 1200px;
    margin: 0 auto 24px;
    padding: 0 24px;
}
.sacfd-hero img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}
.sacfd-hero__caption {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
    font-style: italic;
}

/* ── Page Title ── */
.sacfd-page-title {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 16px;
}
.sacfd-page-title h1 {
    font-size: 36px;
    font-weight: bold;
    color: #000;
    border-bottom: 3px solid #cc0000;
    padding-bottom: 8px;
    display: inline-block;
}

/* ── Two-Column Layout (content + sidebar) ── */
.sacfd-layout-sidebar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 40px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

@media (max-width: 768px) {
    .sacfd-layout-sidebar {
        grid-template-columns: 1fr;
    }
}

/* ── Single Zone Banner ── */
.sacfd-zone-banner {
    height: 30vh;
    min-height: 240px;
    background-color: #1a1a2e;
    background-size: cover;
    background-position: center center;
    position: relative;
}
.sacfd-zone-banner__overlay {
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.25) 40%,
        rgba(0, 0, 0, 0.7) 100%
    );
    display: flex;
    align-items: flex-end;
}
.sacfd-zone-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 32px;
    width: 100%;
}
.sacfd-zone-banner__title {
    font-size: 42px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
    letter-spacing: 0.3px;
}
/* ── Zone Stats Box ── */
.sacfd-zone-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #d5cdb8;
    border: 1px solid #d5cdb8;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 28px;
}
.sacfd-zone-stats__item {
    background: #fff;
    padding: 16px 12px;
    text-align: center;
}
.sacfd-zone-stats__value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.1;
}
.sacfd-zone-stats__label {
    display: block;
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 4px;
}

@media (max-width: 480px) {
    .sacfd-zone-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── WYSIWYG / Description Text ── */
.sacfd-wysiwyg {
    font-size: 17px;
    line-height: 1.8;
}
.sacfd-wysiwyg p {
    margin-bottom: 16px;
}
.sacfd-wysiwyg a {
    color: #1a3a6b;
}

/* ── Sidebar ── */
.sacfd-sidebar {
    border-left: 3px solid #cc0000;
    padding-left: 24px;
}
.sacfd-sidebar h2 {
    font-size: 20px;
    font-weight: bold;
    color: #000;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sacfd-sidebar h3 {
    font-size: 15px;
    font-weight: bold;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 20px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #ddd;
}
.sacfd-sidebar h3:first-of-type {
    margin-top: 0;
}

@media (max-width: 768px) {
    .sacfd-sidebar {
        border-left: none;
        border-top: 3px solid #cc0000;
        padding-left: 0;
        padding-top: 24px;
    }
}

/* ── Link Lists ── */
.sacfd-link-list {
    list-style: none;
    padding: 0;
}
.sacfd-link-list li {
    padding: 5px 0;
    font-size: 16px;
    border-bottom: 1px solid #f0f0f0;
}
.sacfd-link-list li:last-child {
    border-bottom: none;
}
.sacfd-link-list .meta {
    color: #888;
    font-size: 14px;
    margin-left: 4px;
}

/* ── Tables (shared) ── */
.sacfd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    margin-bottom: 24px;
}
.sacfd-table th {
    background: #1a1a2e;
    color: #fff;
    font-weight: bold;
    text-align: left;
    padding: 10px 12px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.sacfd-table td {
    padding: 6px 12px;
    border-bottom: 1px solid #e8e8e8;
}
.sacfd-table tr:hover {
    background: #f8f8f8;
}
.sacfd-table td a {
    color: #1a3a6b;
}

/* ── Section Headings ── */
.sacfd-section-heading {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    border-bottom: 2px solid #cc0000;
    padding-bottom: 6px;
    margin: 32px 0 16px;
}
.sacfd-section-heading:first-child {
    margin-top: 0;
}

/* ── Empty / Placeholder State ── */
.sacfd-empty {
    color: #999;
    font-style: italic;
    font-size: 16px;
    padding: 12px 0;
}

/* ── Placeholder Blocks (empty sections) ── */
.sacfd-placeholder {
    margin-bottom: 24px;
}
.sacfd-placeholder__notice {
    background: #f8f8f8;
    border: 1px dashed #ccc;
    border-radius: 4px;
    padding: 14px 18px;
    color: #888;
    font-size: 15px;
    font-style: italic;
}
.sacfd-placeholder__example {
    position: relative;
    margin-top: 12px;
    background: #ede8d8;
    border: 1px solid #ddd5c0;
    border-radius: 4px;
    padding: 18px;
    color: #bbb;
    pointer-events: none;
    user-select: none;
}
.sacfd-placeholder__example * {
    color: #bbb !important;
    border-color: #e0e0e0 !important;
}
.sacfd-placeholder__example a {
    text-decoration: none !important;
}
.sacfd-placeholder__example .sacfd-table th {
    background: #e0e0e0 !important;
    color: #bbb !important;
}
.sacfd-placeholder__example .sacfd-premiership-year {
    background: #e0e0e0 !important;
    color: #bbb !important;
}
.sacfd-placeholder__example .sacfd-stat-item {
    background: #e0e0e0 !important;
}
.sacfd-placeholder__example-label {
    position: absolute;
    top: -10px;
    left: 12px;
    background: #ede8d8;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #bbb;
}

/* ── Meta Items ── */
.sacfd-meta-item {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    font-size: 15px;
}
.sacfd-meta-label {
    font-weight: 700;
    min-width: 90px;
    color: #555;
}
.sacfd-meta-value {
    color: #000;
}
.sacfd-meta-secondary {
    color: #888;
    font-size: 14px;
}

/* ── Status Badges ── */
.sacfd-status-badge {
    display: inline-block;
    padding: 1px 10px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.sacfd-status-badge--active {
    background: #d4edda;
    color: #155724;
}
.sacfd-status-badge--disbanded {
    background: #f0f0f0;
    color: #666;
}

/* ── Subsection Headings ── */
.sacfd-subsection-heading {
    font-size: 16px;
    font-weight: 600;
    color: #555;
    margin: 20px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e8e3d3;
}

/* ── Notices (mergers, etc.) ── */
.sacfd-notice {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 15px;
    margin-bottom: 20px;
}
.sacfd-notice--merger {
    background: #fff3cd;
    border-left: 4px solid #f5c518;
    color: #333;
}
.sacfd-notice a {
    color: #1a3a6b;
    font-weight: 500;
}

/* ── Record Highlight (single-line records) ── */
.sacfd-record-highlight {
    font-size: 17px;
    padding: 8px 0 16px;
    line-height: 1.5;
}

/* ── Premierships Grid ── */
.sacfd-premierships-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0 16px;
}
.sacfd-premiership-year {
    display: inline-block;
    background: #1a1a2e;
    color: #f5c518;
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 15px;
    font-weight: 700;
}

/* ── Grand Finals special rows ── */
.sacfd-row--drew td {
    background: #f0f0f0;
}
.sacfd-row--recess td,
.sacfd-row--norecord td {
    background: #fafafa;
    color: #999;
}

/* ══════════════════════════════════════
   SINGLE LEAGUE LAYOUT
   ══════════════════════════════════════ */

.sacfd-league-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 40px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
}

/* Sticky sidebar */
.sacfd-league-sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
    border-right: 3px solid #cc0000;
    padding-right: 24px;
}
.sacfd-league-sidebar__logo {
    margin-bottom: 16px;
    text-align: center;
}
.sacfd-league-sidebar__logo img {
    max-width: 160px;
    height: auto;
}
.sacfd-league-sidebar__meta {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}
.sacfd-league-sidebar__heading {
    font-size: 15px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 20px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #ddd;
}

/* Section nav */
.sacfd-league-nav {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 16px;
}
.sacfd-league-nav li {
    padding: 5px 0;
}
.sacfd-league-nav a {
    color: #1a3a6b;
    font-size: 15px;
}

/* League title */
.sacfd-league-title {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    border-bottom: 3px solid #cc0000;
    padding-bottom: 8px;
    margin-bottom: 24px;
}

/* League content area */
.sacfd-league-content {
    min-width: 0; /* allow grid child to shrink below content size */
}
.sacfd-league-content section {
    margin-bottom: 16px;
}

/* Mileage note */
.sacfd-mileage-note {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
    line-height: 1.6;
}

/* ── League Club Timeline (Gantt) ── */
.sacfd-league-gantt-wrap {
    --sacfd-label-width: 200px;
    --sacfd-track-width: 760px;
    border: 1px solid #d5cdb8;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.sacfd-league-gantt {
    overflow: auto;
    max-height: 560px;
}
.sacfd-league-gantt__header {
    display: flex;
    align-items: stretch;
    background: #ece6d2;
    border-bottom: 1px solid #d5cdb8;
    font-size: 12px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 4;
    min-width: calc(var(--sacfd-label-width) + var(--sacfd-track-width));
}
.sacfd-league-gantt__corner {
    width: var(--sacfd-label-width);
    flex-shrink: 0;
    padding: 10px 14px;
    border-right: 1px solid #d5cdb8;
    position: sticky;
    left: 0;
    background: #ece6d2;
    z-index: 3;
}
.sacfd-league-gantt__axis {
    position: relative;
    width: var(--sacfd-track-width);
    flex-shrink: 0;
    min-height: 30px;
}
.sacfd-league-gantt__tick {
    position: absolute;
    top: 10px;
    transform: translateX(-50%);
    font-size: 11px;
    color: #666;
    font-weight: 600;
    white-space: nowrap;
}

.sacfd-league-gantt__body {
    /* scroll is on the outer container now */
}
.sacfd-league-gantt__row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #f0ebe0;
    min-height: 36px;
    min-width: calc(var(--sacfd-label-width) + var(--sacfd-track-width));
}
.sacfd-league-gantt__row:last-child {
    border-bottom: none;
}
.sacfd-league-gantt__row:hover {
    background: #f8f5ea;
}
.sacfd-league-gantt__club {
    width: var(--sacfd-label-width);
    flex-shrink: 0;
    padding: 9px 14px;
    font-size: 14px;
    color: #1a3a6b;
    border-right: 1px solid #f0ebe0;
    display: flex;
    align-items: center;
    text-decoration: none;
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 3;
}
.sacfd-league-gantt__row:hover .sacfd-league-gantt__club {
    background: #f8f5ea;
}
.sacfd-league-gantt__club:hover {
    background: #ece6d2 !important;
    text-decoration: none;
}
.sacfd-league-gantt__track {
    position: relative;
    width: var(--sacfd-track-width);
    flex-shrink: 0;
}
.sacfd-league-gantt__gridline {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #f0ebe0;
}
.sacfd-league-gantt__bar {
    position: absolute;
    top: 10px;
    height: 16px;
    border-radius: 3px;
    background: #1a3a6b;
    min-width: 4px;
    cursor: help;
    transition: transform 0.15s, box-shadow 0.15s;
}
.sacfd-league-gantt__bar:hover {
    transform: scaleY(1.15);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 2;
}

/* Global tooltip (positioned by JS, escapes overflow containers) */
.sacfd-tooltip {
    position: fixed;
    background: #1a1a2e;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    z-index: 9999;
    max-width: 260px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.12s, transform 0.12s;
}
.sacfd-tooltip--visible {
    opacity: 1;
    transform: translateY(0);
}
.sacfd-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1a1a2e;
}
.sacfd-tooltip--below::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: #1a1a2e;
}
.sacfd-tooltip__title {
    font-weight: 600;
    font-size: 13px;
}
.sacfd-tooltip__note {
    color: #bbb;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.4;
    white-space: normal;
}

.sacfd-league-gantt__bar--playing     { background: #1a3a6b; }
.sacfd-league-gantt__bar--recess      { background: repeating-linear-gradient(135deg, #d5cdb8, #d5cdb8 5px, #e8e3d3 5px, #e8e3d3 10px); border: 1px dashed #a59a76; top: 11px; height: 14px; }
.sacfd-league-gantt__bar--transferred { background: #5a8ac9; }
.sacfd-league-gantt__bar--away {
    background: repeating-linear-gradient(135deg, #c5d4e5, #c5d4e5 5px, #dde4ec 5px, #dde4ec 10px);
    border: 1px dashed #5a8ac9;
    top: 11px;
    height: 14px;
}

/* Point-in-time events (merged, renamed, disbanded) render as diamond markers */
.sacfd-league-gantt__bar--merged,
.sacfd-league-gantt__bar--renamed,
.sacfd-league-gantt__bar--disbanded,
.sacfd-league-gantt__bar--disqualified {
    width: 14px !important;
    min-width: 14px;
    height: 14px;
    top: 11px;
    border-radius: 2px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
    z-index: 2;
}

/* Disbanded: sits to the right of the preceding playing bar */
.sacfd-league-gantt__bar--disbanded,
.sacfd-league-gantt__bar--disqualified {
    transform: rotate(45deg);
    background: #cc0000;
}
.sacfd-league-gantt__bar--disbanded:hover,
.sacfd-league-gantt__bar--disqualified:hover {
    transform: rotate(45deg) scale(1.25);
}

/* Merged / renamed: centered on the event year */
.sacfd-league-gantt__bar--merged,
.sacfd-league-gantt__bar--renamed {
    transform: translateX(-7px) rotate(45deg);
}
.sacfd-league-gantt__bar--merged      { background: #f5c518; }
.sacfd-league-gantt__bar--renamed     { background: #6f42c1; }

.sacfd-league-gantt__bar--merged:hover,
.sacfd-league-gantt__bar--renamed:hover {
    transform: translateX(-7px) rotate(45deg) scale(1.25);
}

.sacfd-league-gantt__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 12px 14px;
    background: #f8f5ea;
    border-top: 1px solid #d5cdb8;
    font-size: 12px;
    color: #666;
}
.sacfd-league-gantt__swatch {
    display: inline-block;
    width: 14px;
    height: 10px;
    border-radius: 2px;
    margin-right: 4px;
    vertical-align: middle;
}
.sacfd-league-gantt__swatch--playing { background: #1a3a6b; }
.sacfd-league-gantt__swatch--recess { background: repeating-linear-gradient(135deg, #d5cdb8, #d5cdb8 2px, #e8e3d3 2px, #e8e3d3 4px); border: 1px dashed #a59a76; height: 8px; }
.sacfd-league-gantt__swatch--away { background: repeating-linear-gradient(135deg, #c5d4e5, #c5d4e5 2px, #dde4ec 2px, #dde4ec 4px); border: 1px dashed #5a8ac9; height: 8px; }
.sacfd-league-gantt__swatch--merged,
.sacfd-league-gantt__swatch--renamed,
.sacfd-league-gantt__swatch--disbanded {
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    border-radius: 1px;
    margin-right: 8px;
}
.sacfd-league-gantt__swatch--merged { background: #f5c518; }
.sacfd-league-gantt__swatch--renamed { background: #6f42c1; }
.sacfd-league-gantt__swatch--disbanded { background: #cc0000; }

@media (max-width: 640px) {
    .sacfd-league-gantt__corner,
    .sacfd-league-gantt__club {
        width: 140px;
    }
    .sacfd-league-gantt__club {
        font-size: 13px;
        padding: 9px 10px;
    }
}

@media (max-width: 768px) {
    .sacfd-league-layout {
        grid-template-columns: 1fr;
    }
    .sacfd-league-sidebar {
        position: static;
        border-right: none;
        border-bottom: 3px solid #cc0000;
        padding-right: 0;
        padding-bottom: 24px;
    }
}

/* ══════════════════════════════════════
   SINGLE CLUB LAYOUT
   ══════════════════════════════════════ */

.sacfd-club-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 40px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
}

/* ── Club Sidebar ── */
.sacfd-club-sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
}
.sacfd-club-sidebar__logo {
    margin-bottom: 20px;
    text-align: center;
}
.sacfd-club-sidebar__logo img {
    max-width: 160px;
    height: auto;
    border-radius: 4px;
}
.sacfd-club-sidebar__logo-placeholder {
    width: 160px;
    height: 160px;
    margin: 0 auto;
    background: #e8e3d3;
    border: 2px dashed #d5cdb8;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sacfd-club-sidebar__logo-placeholder span {
    font-size: 56px;
    font-weight: 700;
    color: #c5bda8;
    line-height: 1;
}
.sacfd-club-sidebar__meta {
    padding-bottom: 16px;
    border-bottom: 1px solid #d5cdb8;
    margin-bottom: 16px;
}
.sacfd-club-sidebar__meta .sacfd-meta-item {
    flex-direction: column;
    gap: 1px;
    padding: 6px 0;
    border-bottom: 1px solid #ece6d2;
}
.sacfd-club-sidebar__meta .sacfd-meta-item:last-child {
    border-bottom: none;
}
.sacfd-club-sidebar__meta .sacfd-meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    min-width: 0;
}
.sacfd-club-sidebar__meta .sacfd-meta-value {
    font-size: 15px;
}
.sacfd-club-sidebar__stat {
    text-align: center;
    padding: 14px;
    background: #1a1a2e;
    border-radius: 6px;
}
.sacfd-club-sidebar__stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #f5c518;
    line-height: 1.1;
}
.sacfd-club-sidebar__stat-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #ccc;
    margin-top: 4px;
}

/* ── Club Content ── */
.sacfd-club-title {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    border-bottom: 2px solid #cc0000;
    padding-bottom: 8px;
    margin-bottom: 4px;
}
.sacfd-club-nickname {
    font-size: 18px;
    color: #666;
    font-style: italic;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .sacfd-club-layout {
        grid-template-columns: 1fr;
    }
    .sacfd-club-sidebar {
        position: static;
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 20px;
    }
    .sacfd-club-sidebar__logo {
        margin-bottom: 0;
    }
    .sacfd-club-sidebar__logo-placeholder {
        width: 100px;
        height: 100px;
    }
    .sacfd-club-sidebar__logo-placeholder span {
        font-size: 36px;
    }
    .sacfd-club-sidebar__stat {
        grid-column: 1 / -1;
    }
}

/* ── Gap between badge and adjacent league link ── */
.sacfd-hybrid-timeline__event > .sacfd-hybrid-timeline__event-type + a,
.sacfd-hybrid-timeline__event > .sacfd-hybrid-timeline__event-type + span {
    margin-left: 8px;
}

/* ══════════════════════════════════════
   Club Timeline (Hybrid)
   ══════════════════════════════════════ */
.sacfd-hybrid-timeline {
    position: relative;
    margin-bottom: 12px;
    padding-left: 0;
}
.sacfd-hybrid-timeline::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: #d5cdb8;
    z-index: 0;
}
.sacfd-hybrid-timeline__row {
    display: grid;
    grid-template-columns: 28px 110px 240px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px 4px;
    border-bottom: 1px solid #ece6d2;
    position: relative;
    font-size: 15px;
}
.sacfd-hybrid-timeline__row:last-child {
    border-bottom: none;
}
.sacfd-hybrid-timeline__marker {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.sacfd-hybrid-timeline__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1a3a6b;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #d5cdb8;
}
.sacfd-hybrid-timeline__years {
    font-weight: 700;
    color: #1a1a2e;
    font-variant-numeric: tabular-nums;
}
.sacfd-hybrid-timeline__event {
    font-size: 15px;
}
.sacfd-hybrid-timeline__event a {
    color: #1a3a6b;
    font-weight: 500;
}
.sacfd-hybrid-timeline__event-type {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 3px;
    background: transparent;
    border: 1px solid currentColor;
    color: #666;
}
.sacfd-hybrid-timeline__note {
    color: #888;
    font-size: 13px;
    line-height: 1.4;
}

/* Event type variations */
.sacfd-hybrid-timeline__row--playing .sacfd-hybrid-timeline__dot { background: #1a3a6b; }

.sacfd-hybrid-timeline__row--recess .sacfd-hybrid-timeline__dot { background: #bbb; box-shadow: 0 0 0 2px #ddd; }
.sacfd-hybrid-timeline__row--recess .sacfd-hybrid-timeline__years { color: #aaa; }
.sacfd-hybrid-timeline__row--recess .sacfd-hybrid-timeline__event-type { color: #999; }

.sacfd-hybrid-timeline__row--merged .sacfd-hybrid-timeline__dot { background: #f5c518; box-shadow: 0 0 0 2px #fde9a8; }
.sacfd-hybrid-timeline__row--merged .sacfd-hybrid-timeline__event-type { color: #b8860b; }

.sacfd-hybrid-timeline__row--transferred .sacfd-hybrid-timeline__dot { background: #5a8ac9; box-shadow: 0 0 0 2px #c5d9ed; }
.sacfd-hybrid-timeline__row--transferred .sacfd-hybrid-timeline__event-type { color: #1a5490; }

.sacfd-hybrid-timeline__row--renamed .sacfd-hybrid-timeline__dot { background: #6f42c1; box-shadow: 0 0 0 2px #d8c8ec; }
.sacfd-hybrid-timeline__row--renamed .sacfd-hybrid-timeline__event-type { color: #6f42c1; }

.sacfd-hybrid-timeline__row--disbanded .sacfd-hybrid-timeline__dot,
.sacfd-hybrid-timeline__row--disqualified .sacfd-hybrid-timeline__dot { background: #cc0000; box-shadow: 0 0 0 2px #f5b4b8; }
.sacfd-hybrid-timeline__row--disbanded .sacfd-hybrid-timeline__event-type,
.sacfd-hybrid-timeline__row--disqualified .sacfd-hybrid-timeline__event-type { color: #cc0000; }



/* ══════════════════════════════════════
   SINGLE PLAYER PROFILE
   ══════════════════════════════════════ */

.sacfd-player-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 40px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

.sacfd-player-sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
}
.sacfd-player-photo {
    margin-bottom: 16px;
}
.sacfd-player-photo img {
    width: 100%;
    border-radius: 4px;
    display: block;
}
.sacfd-player-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}
.sacfd-stat-item {
    flex: 1;
    min-width: 80px;
    background: #1a1a2e;
    color: #fff;
    border-radius: 4px;
    padding: 10px 12px;
    text-align: center;
}
.sacfd-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #f5c518;
    line-height: 1.2;
}
.sacfd-stat-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ccc;
    margin-top: 2px;
}
.sacfd-player-sidebar__heading {
    font-size: 15px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 20px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #ddd;
}
.sacfd-player-name {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    border-bottom: 3px solid #cc0000;
    padding-bottom: 8px;
    margin-bottom: 24px;
}

/* Achievements list */
.sacfd-achievements-list {
    list-style: none;
    padding: 0;
}
.sacfd-achievements-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 16px;
}
.sacfd-achievements-list li:last-child {
    border-bottom: none;
}
.sacfd-achievement-detail {
    display: block;
    color: #666;
    font-size: 14px;
    margin-top: 2px;
}

/* Goalkicking status badge */
.sacfd-gk-status-badge {
    display: inline-block;
    background: #e8f4fd;
    color: #0066cc;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}

/* Goalkicking table tweaks */
.sacfd-table--goalkicking td:nth-child(3) {
    font-weight: 700;
}

/* Photo gallery */
.sacfd-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.sacfd-photo-gallery__item img {
    width: 100%;
    border-radius: 4px;
    display: block;
}
.sacfd-photo-gallery__caption {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

@media (max-width: 768px) {
    .sacfd-player-layout {
        grid-template-columns: 1fr;
    }
    .sacfd-player-sidebar {
        position: static;
    }
    .sacfd-player-photo img {
        max-width: 300px;
        margin: 0 auto;
    }
}

/* ══════════════════════════════════════
   RECORDS INDEX
   ══════════════════════════════════════ */

.sacfd-records-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding-bottom: 40px;
}
.sacfd-record-card {
    display: block;
    padding: 20px 24px;
    background: #f8f8f8;
    border-left: 4px solid #cc0000;
    border-radius: 4px;
    color: #000;
    text-decoration: none;
    transition: background 0.15s, box-shadow 0.15s;
}
.sacfd-record-card:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-decoration: none;
}
.sacfd-record-card__title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #000;
}
.sacfd-record-card__desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.5;
}
.sacfd-record-card__type {
    display: inline-block;
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ══════════════════════════════════════
   SINGLE RECORD CATEGORY
   ══════════════════════════════════════ */

.sacfd-record-page {
    padding-bottom: 40px;
}

/* Group navigation (1-50, 51-100, etc.) */
.sacfd-group-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.sacfd-group-nav__link {
    display: inline-block;
    padding: 6px 14px;
    background: #1a1a2e;
    color: #fff;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}
.sacfd-group-nav__link:hover {
    background: #cc0000;
    text-decoration: none;
    color: #fff;
}

/* Group anchor rows in tables */
.sacfd-group-anchor {
    background: #e8e8e8 !important;
    font-weight: 700;
    font-size: 15px;
    color: #333;
    text-align: center;
}

/* Record status badges (X/R/M/U/A) */
.sacfd-record-status {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
}
.sacfd-record-status--x { background: #d4edda; color: #155724; }
.sacfd-record-status--r { background: #f0f0f0; color: #666; }
.sacfd-record-status--m { background: #fff3cd; color: #856404; }
.sacfd-record-status--u { background: #e8e8e8; color: #999; }
.sacfd-record-status--a { background: #cce5ff; color: #004085; }

/* ══════════════════════════════════════
   PLAYER PROFILES INDEX
   ══════════════════════════════════════ */

.sacfd-profiles-page {
    padding-bottom: 40px;
}

/* Alphabet jump nav */
.sacfd-alpha-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 24px;
}
.sacfd-alpha-nav__link {
    display: inline-block;
    width: 34px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    border-radius: 3px;
    background: #1a1a2e;
    color: #fff;
    text-decoration: none;
}
.sacfd-alpha-nav__link:hover {
    background: #cc0000;
    color: #fff;
    text-decoration: none;
}
.sacfd-alpha-nav__link--disabled {
    background: #e8e8e8;
    color: #bbb;
    cursor: default;
}

/* Letter groups */
.sacfd-profiles-letter {
    margin-bottom: 24px;
}
.sacfd-profiles-letter__heading {
    font-size: 24px;
    font-weight: 700;
    color: #cc0000;
    border-bottom: 2px solid #cc0000;
    padding-bottom: 4px;
    margin-bottom: 12px;
    display: inline-block;
}
.sacfd-profiles-letter__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px 24px;
}
.sacfd-profile-link {
    color: #1a3a6b;
    font-size: 16px;
    padding: 3px 0;
    display: block;
}
.sacfd-profile-link:hover {
    text-decoration: underline;
}

/* ══════════════════════════════════════
   ZONE INDEX PAGE
   ══════════════════════════════════════ */

.sacfd-zones-page {
    padding-bottom: 40px;
}
.sacfd-zone-map-wrap {
    margin-bottom: 32px;
}

.sacfd-zones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.sacfd-zone-card {
    display: block;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    text-decoration: none;
    color: #000;
    transition: box-shadow 0.15s, transform 0.15s;
}
.sacfd-zone-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    text-decoration: none;
}
.sacfd-zone-card__image {
    height: 140px;
    overflow: hidden;
    background: #e8e3d3;
}
.sacfd-zone-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.sacfd-zone-card__image--empty {
    display: flex;
    align-items: center;
    justify-content: center;
}
.sacfd-zone-card__body {
    padding: 14px 18px;
}
.sacfd-zone-card__title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #000;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sacfd-zone-card__swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.1);
}
.sacfd-zone-card__count {
    font-size: 14px;
    color: #888;
}
