:root {
  --ink: #11131a;
  --muted: #687080;
  --paper: #f6f7f9;
  --card: #fff;
  --line: #dfe3e9;
  --accent: #f7dd27;
  --accent-ink: #161300;
  --green: #118a57;
  --red: #d04454;
  --blue: #2948ff;
  --shadow: 0 18px 50px rgba(17, 19, 26, .12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "DM Sans", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(17,19,26,.96); color: #fff; backdrop-filter: blur(10px); }
.header-inner { max-width: 1320px; margin: auto; padding: 14px 28px; display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 50px; height: 50px; background: var(--accent); color: var(--accent-ink); font: 700 22px/1 Oswald; transform: skew(-7deg); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; }
.brand small { color: #aeb4c0; margin-top: 2px; }
.header-actions { display: flex; gap: 10px; }
.primary-btn, .ghost-btn { border: 1px solid transparent; border-radius: 8px; padding: 11px 16px; font-weight: 700; }
.primary-btn { background: var(--accent); color: var(--accent-ink); }
.ghost-btn { background: transparent; color: inherit; border-color: currentColor; opacity: .9; }
.hero { background: var(--ink); color: white; min-height: 450px; display: grid; grid-template-columns: 1.35fr .65fr; gap: 50px; align-items: end; padding: 70px max(28px, calc((100vw - 1264px)/2)) 60px; overflow: hidden; position: relative; }
.hero::after { content:""; position:absolute; width:460px; height:460px; right:-160px; top:-180px; border: 70px solid rgba(247,221,39,.12); border-radius: 50%; }
.eyebrow { font: 700 13px/1 Oswald; letter-spacing: .15em; color: var(--accent); margin: 0 0 16px; }
.eyebrow.dark { color: #626a79; }
h1, h2, h3 { font-family: Oswald, sans-serif; text-transform: uppercase; margin-top: 0; }
h1 { font-size: clamp(52px, 8vw, 96px); line-height: .94; letter-spacing: -.03em; margin-bottom: 24px; }
h1 span { color: var(--accent); }
.hero-text { max-width: 650px; color: #c1c6d0; font-size: 18px; line-height: 1.65; }
.hero-meta { display:flex; gap:10px; align-items:center; color:#aeb4c0; font-size:14px; margin-top:28px; }
.live-dot { width:9px; height:9px; background:#42d888; border-radius:50%; box-shadow:0 0 0 5px rgba(66,216,136,.14); }
.hero-panel { position: relative; z-index: 1; background: #20232d; padding: 24px; border: 1px solid #353a47; border-radius: 14px; }
.season-select-wrap { display:flex; justify-content:space-between; align-items:center; padding-bottom:20px; border-bottom:1px solid #3b404c; }
.season-select-wrap label { color:#aeb4c0; font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
select { padding:10px 34px 10px 12px; border:1px solid #cbd0d8; border-radius:7px; background:white; }
.hero-panel select { background:#14161c; color:white; border-color:#4b5160; }
.hero-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; padding-top:20px; }
.hero-stats div { min-width:0; }
.hero-stats strong, .hero-stats span { display:block; }
.hero-stats strong { font:700 34px/1 Oswald; color:var(--accent); }
.hero-stats span { color:#aeb4c0; font-size:12px; margin-top:7px; }
.toolbar { max-width:1264px; margin: -24px auto 0; position:relative; z-index:3; background:white; box-shadow:var(--shadow); border-radius:12px; padding:16px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.search-wrap { display:flex; align-items:center; gap:10px; flex:1; max-width:470px; background:#f1f3f6; border-radius:8px; padding:0 14px; }
.search-wrap input { width:100%; border:0; outline:0; background:transparent; padding:13px 0; }
.filter-tabs { display:flex; gap:8px; }
.filter-tab { border:0; background:transparent; border-radius:7px; padding:10px 13px; color:var(--muted); font-weight:700; }
.filter-tab.active { background:var(--ink); color:white; }
.teams-section { max-width:1264px; margin:0 auto; padding:70px 0 90px; }
.section-heading { display:flex; justify-content:space-between; align-items:end; margin-bottom:26px; }
.section-heading h2 { font-size:40px; margin-bottom:0; }
.section-heading > p { color:var(--muted); }
.team-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
.team-card { background:white; border:1px solid var(--line); border-radius:12px; overflow:hidden; transition:.2s ease; cursor:pointer; position:relative; }
.team-card:hover { transform:translateY(-4px); box-shadow:var(--shadow); }
.team-band { height:10px; background:var(--team-color); }
.team-card-body { padding:22px; }
.team-badge { width:58px; height:58px; border-radius:50%; display:grid; place-items:center; background:color-mix(in srgb, var(--team-color) 15%, white); color:var(--team-color); font:700 18px/1 Oswald; margin-bottom:22px; border:1px solid color-mix(in srgb, var(--team-color) 28%, white); }
.team-card h3 { font-size:25px; line-height:1.05; min-height:52px; margin-bottom:8px; }
.team-location { color:var(--muted); font-size:13px; }
.card-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; border-top:1px solid var(--line); margin-top:20px; padding-top:18px; }
.card-stats strong, .card-stats span { display:block; }
.card-stats strong { font:700 22px/1 Oswald; }
.card-stats span { font-size:10px; color:var(--muted); text-transform:uppercase; margin-top:5px; }
.card-arrow { position:absolute; right:18px; top:28px; font-size:22px; }
.team-dialog, .sources-dialog, .edit-dialog { width:min(1000px, calc(100vw - 30px)); max-height:90vh; border:0; border-radius:15px; padding:0; box-shadow:0 30px 100px rgba(0,0,0,.38); }
.sources-dialog, .edit-dialog { padding:28px; width:min(820px, calc(100vw - 30px)); }
dialog::backdrop { background:rgba(7,9,14,.78); backdrop-filter:blur(5px); }
.dialog-topbar { display:flex; align-items:start; justify-content:space-between; gap:20px; }
.dialog-topbar h2 { font-size:34px; margin-bottom:14px; }
.icon-btn { border:0; width:40px; height:40px; border-radius:50%; font-size:27px; background:#edf0f3; }
.team-modal-header { background:var(--ink); color:white; padding:28px 32px; position:relative; border-top:9px solid var(--team-color); }
.team-modal-header h2 { font-size:45px; margin:8px 0; }
.team-modal-header p { color:#abb2bf; margin:0; }
.team-modal-header .icon-btn { position:absolute; right:25px; top:22px; }
.team-modal-body { padding:30px 32px 38px; }
.modal-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:28px; }
.modal-summary div { background:#f0f2f5; border-radius:8px; padding:15px; }
.modal-summary strong { font:700 28px/1 Oswald; display:block; }
.modal-summary span { font-size:12px; color:var(--muted); }
.movement-columns { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.movement-heading { display:flex; align-items:center; justify-content:space-between; border-bottom:2px solid var(--ink); padding-bottom:10px; margin-bottom:12px; }
.movement-heading h3 { margin:0; font-size:22px; }
.pill { border-radius:999px; padding:5px 9px; font-size:11px; font-weight:800; }
.pill.in { background:#ddf6ea; color:#087344; }
.pill.out { background:#ffe5e8; color:#ae2637; }
.player-row { display:grid; grid-template-columns:1fr auto; gap:12px; padding:13px 0; border-bottom:1px solid var(--line); }
.player-name { font-weight:800; }
.player-note, .player-date { color:var(--muted); font-size:12px; margin-top:3px; }
.source-link { color:var(--blue); text-decoration:none; font-size:12px; font-weight:700; align-self:center; }
.empty-state { color:var(--muted); padding:18px 0; }
.squad-list { margin-top:30px; }
.squad-list h3 { font-size:24px; margin-bottom:12px; }
.player-chips { display:flex; flex-wrap:wrap; gap:8px; }
.player-chip { background:#f0f2f5; border:1px solid #e1e4e9; border-radius:999px; padding:8px 11px; font-size:13px; }
.sources-list { margin-top:22px; }
.source-item { padding:16px 0; border-top:1px solid var(--line); display:grid; grid-template-columns:1fr auto; gap:18px; }
.source-item strong { display:block; }
.source-item span { color:var(--muted); font-size:13px; }
.form-note { background:#fff8c9; padding:12px 14px; border-radius:7px; font-size:13px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:20px; }
.form-grid label { display:flex; flex-direction:column; gap:6px; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:#555d6b; }
.form-grid input, .form-grid select, .form-grid textarea { width:100%; border:1px solid #cbd0d8; padding:11px 12px; border-radius:7px; text-transform:none; }
.form-grid .wide { grid-column:1 / -1; }
.form-actions { display:flex; justify-content:space-between; margin-top:24px; }
.edit-dialog .ghost-btn { color:var(--ink); }
footer { border-top:1px solid var(--line); max-width:1264px; margin:auto; padding:25px 0 45px; display:flex; justify-content:space-between; color:var(--muted); font-size:12px; }
@media (max-width: 1050px) { .team-grid { grid-template-columns:repeat(2,1fr); } .hero { grid-template-columns:1fr; align-items:center; } .hero-panel { max-width:580px; } }
@media (max-width: 700px) { .header-inner { padding:12px 16px; } .brand small, .header-actions .ghost-btn { display:none; } .hero { padding:55px 20px 55px; min-height:0; } h1 { font-size:55px; } .hero-stats strong { font-size:27px; } .toolbar { margin:0; border-radius:0; flex-direction:column; align-items:stretch; } .search-wrap { max-width:none; } .filter-tabs { overflow:auto; } .teams-section { padding:45px 16px 70px; } .section-heading { align-items:start; flex-direction:column; } .team-grid { grid-template-columns:1fr; } .movement-columns { grid-template-columns:1fr; } .team-modal-header { padding:24px 20px; } .team-modal-header h2 { font-size:35px; padding-right:40px; } .team-modal-body { padding:24px 20px 30px; } .modal-summary { grid-template-columns:1fr 1fr 1fr; } .form-grid { grid-template-columns:1fr; } .form-grid .wide { grid-column:auto; } footer { margin:0 16px; flex-direction:column; } }

.card-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:.65rem}.card-title-row h3{margin-right:auto}.complete-badge{display:inline-flex;white-space:nowrap;font-size:.68rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;background:#e8fff2;color:#08783f;border:1px solid #a9e9c7;border-radius:999px;padding:.3rem .5rem}.squad-complete-banner{margin:0 0 1rem;padding:.8rem 1rem;border-radius:10px;background:#e8fff2;color:#08783f;font-weight:800;border:1px solid #a9e9c7}.source-item span{display:block;margin-top:.2rem}.team-card:has(.complete-badge){box-shadow:0 12px 30px rgba(0,0,0,.11)}
.refresh-divider{opacity:.45}.header-actions button:disabled{opacity:.55;cursor:wait}.hero-meta{flex-wrap:wrap}#refreshStatus{color:#8fd9b5}
@media (max-width:700px){#updateBtn{display:inline-flex}.header-actions{gap:6px}.header-actions button{padding:9px 10px;font-size:12px}}


/* Player profile links */
.player-profile-link { color: inherit; text-decoration: none; font-weight: inherit; }
.player-profile-link:hover, .player-profile-link:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.player-profile-link span, .player-chip-link span { font-size: .78em; opacity: .7; }
a.player-chip { text-decoration: none; color: inherit; }
a.player-chip:hover, a.player-chip:focus-visible { transform: translateY(-1px); text-decoration: underline; text-underline-offset: 3px; }


/* Latest league-wide changes */
.latest-changes-panel{margin-top:34px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:20px 22px;box-shadow:0 8px 24px rgba(18,22,31,.06)}
.latest-changes-head{display:flex;justify-content:space-between;align-items:end;gap:20px;padding-bottom:14px;border-bottom:2px solid var(--ink)}
.latest-changes-head .eyebrow{margin-bottom:7px}.latest-changes-head h3{font-size:27px;margin:0}.latest-changes-timestamp{margin:0;color:var(--muted);font-size:12px;text-align:right}
.latest-changes-list{display:grid}.latest-change-row{display:grid;grid-template-columns:105px 46px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.latest-change-row:last-child{border-bottom:0}.latest-change-row time{font-size:12px;color:var(--muted);font-weight:700}.latest-change-copy{min-width:0}.latest-change-copy strong,.latest-change-copy span{display:block}.latest-change-copy strong{font-size:14px}.latest-change-copy span{font-size:12px;color:var(--muted);margin-top:3px}.source-missing{font-size:12px;color:var(--muted)}
@media(max-width:700px){.latest-changes-head{align-items:flex-start;flex-direction:column}.latest-changes-timestamp{text-align:left}.latest-change-row{grid-template-columns:80px 42px 1fr}.latest-change-row .source-link,.latest-change-row .source-missing{grid-column:3}.latest-changes-panel{padding:18px 16px}}
