:root{color-scheme:light;--ink:#16392e;--muted:#64736b;--paper:#f6f7f1;--line:#dce2d7;--accent:#d8f372;--white:#fff;--rail:#123e30}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:Inter,"Segoe UI",Arial,sans-serif;font-size:14px;line-height:1.5}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:default;opacity:.4}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:3px solid #739b2f;outline-offset:3px}[hidden]{display:none!important}.rail{background:var(--rail);color:#e9f0e7;position:fixed;inset:0 auto 0 0;width:230px;padding:36px 22px;display:flex;flex-direction:column}.brand{display:flex;gap:13px;align-items:center;color:inherit;text-decoration:none;font-size:11px;letter-spacing:2px;line-height:1.25}.brand strong{font-size:22px;letter-spacing:6px}.brand-mark{border:1px solid #85a18d;border-radius:12px;padding:9px 7px;font-size:23px;letter-spacing:-2px;font-weight:750}.brand-mark span{color:var(--accent);font-size:17px}.rail-label{margin-top:62px;font-size:10px;color:#9bb6a6;letter-spacing:1.5px}nav{display:grid;gap:7px}.nav-button{border:0;background:transparent;color:#bdd0c4;border-radius:7px;padding:13px 12px;text-align:left;font-size:13px}.nav-button span{margin-right:9px}.nav-button.active{background:#2d5641;color:var(--accent)}.rail-note{margin-top:auto;font-size:12px;color:#dbe6d7}.rail-note p{color:#9bb6a6;font-size:12px;line-height:1.8}.status-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--accent);margin-right:6px}main{margin-left:230px;padding:0 46px;max-width:1720px}.topbar{display:flex;align-items:center;justify-content:space-between;padding:24px 0;border-bottom:1px solid var(--line);font-size:10px;letter-spacing:1.6px;color:var(--muted)}.badge{display:inline-block;padding:5px 10px;border:1px solid var(--line);border-radius:5px;font-size:11px;letter-spacing:.2px;white-space:nowrap;background:#fbfcf8}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:30px;padding:38px 0 22px}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:650;margin:0 0 14px;color:#64804f}h1{font-size:clamp(30px,3.4vw,46px);line-height:1.12;letter-spacing:-1.8px;font-weight:600;margin:0 0 15px}h2{font-size:20px;font-weight:600;letter-spacing:-.4px;margin:0}.page-heading p:not(.eyebrow){color:var(--muted);margin-bottom:0;max-width:500px}.primary,.secondary{display:inline-flex;justify-content:center;align-items:center;gap:20px;border-radius:6px;font-weight:600;border:1px solid transparent}.primary{background:var(--ink);color:white;padding:13px 19px;white-space:nowrap}.primary:hover{background:#28513c}.primary span{color:var(--accent);font-size:18px}.secondary{background:var(--white);border-color:var(--line);padding:9px 12px;font-size:12px;color:var(--ink)}.secondary:hover{background:#edf2e5}.text-button{border:0;background:transparent;color:var(--muted);font-size:12px;padding:8px;text-decoration:underline}.file-actions{display:flex;flex-direction:column;align-items:center}.message{margin:0;color:var(--muted);font-size:12px}.message:not(:empty){padding:0 0 16px}.message.error{color:#a0372f}.stats{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);border-radius:8px;background:#fbfcf8;margin:12px 0 30px}.stats>div{padding:20px 24px;border-right:1px solid var(--line)}.stats>div:last-child{border:0}.stats span{font-size:9px;letter-spacing:1.1px;color:var(--muted);display:block}.stats strong{font-size:30px;font-weight:500;display:block;margin-top:7px;line-height:1.25;font-variant-numeric:tabular-nums}.stats .season-value{font-size:22px;margin-top:14px}.empty-state{padding:45px 24px;text-align:center;border:1px dashed #becab7;border-radius:10px;background:#fcfdf9}.empty-state .file-symbol{display:inline-flex;gap:20px;align-items:center;border:1px solid #bac9ab;border-radius:8px;padding:12px 15px;background:#edf5d9;font-weight:650;font-size:16px;margin-bottom:24px}.file-symbol span{font-size:24px}.empty-state h2{font-size:27px}.empty-state p{max-width:590px;margin:15px auto;color:var(--muted)}.file-list{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:22px 0}code{font-size:12px}.file-list code{background:#eff2e9;border:1px solid var(--line);padding:7px 10px;border-radius:5px}.muted{font-size:12px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:30px 0 18px}.panel-heading p{margin:4px 0 0;color:var(--muted);font-size:12px}.filters{display:flex;align-items:end;gap:12px;padding:15px;background:#ecf0e6;border:1px solid var(--line);border-radius:8px 8px 0 0}.filters label{display:grid;gap:6px;font-size:10px;font-weight:600;color:var(--muted);min-width:0}.filters .search-label{flex:1;min-width:140px}input,select{background:white;color:var(--ink);border:1px solid #d2dacb;border-radius:4px;padding:9px 10px;min-height:38px;max-width:100%;font-size:12px}#minutes{width:100px}.table-container{overflow:auto;border:1px solid var(--line);border-top:0;background:white;min-height:160px}table{width:100%;border-collapse:collapse;font-size:12px;white-space:nowrap}th{background:#f7f9f2;color:var(--muted);font-weight:500;text-align:left;padding:0;border-bottom:1px solid var(--line)}th button{border:0;background:transparent;color:inherit;padding:14px;display:block;min-width:100%;text-align:inherit;font-size:10px;white-space:nowrap}td{padding:14px;border-bottom:1px solid #edf0e7;font-variant-numeric:tabular-nums}td:first-child{font-weight:600}tr:last-child td{border-bottom:0}tbody tr:hover{background:#f6f9ed}.numeric{text-align:right}.no-results{text-align:center!important;padding:45px!important;color:var(--muted);font-weight:400!important}.table-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 0}.table-footer p{font-size:11px;color:var(--muted)}.pagination{display:flex;align-items:center;gap:14px;font-size:11px;white-space:nowrap}.context-note{border-left:3px solid #afc779;background:#eff3e6;padding:17px 20px;margin:12px 0 24px;font-size:12px}.context-note p{margin:5px 0 0;color:var(--muted);max-width:900px}footer{border-top:1px solid var(--line);padding:25px 0;margin-top:35px;display:flex;justify-content:space-between;gap:15px;font-size:10px;color:var(--muted)}
.tier-intro{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:20px}.tier-intro p{margin:5px 0;color:var(--muted);font-size:12px}.tier-method{border:1px solid var(--line);border-radius:7px;background:#fcfdf9;padding:14px 18px;font-size:12px;margin-bottom:16px}.tier-method summary{cursor:pointer;font-weight:600}.tier-method p{color:var(--muted);max-width:950px;margin-bottom:0}.coverage-note{font-size:12px;color:var(--muted);line-height:1.7}.tier-filters{border-radius:8px;margin:20px 0 25px}.tier-filters input[type=number]{width:145px}.tier-board{display:grid;gap:23px}.tier-lane{border:1px solid var(--line);border-radius:8px;overflow:hidden;background:white;--tier-bg:#eaf3d2;--tier-fg:#33512b}.tier-s{--tier-bg:#d8f372;--tier-fg:#224025}.tier-a{--tier-bg:#d4ead2;--tier-fg:#2b5739}.tier-b{--tier-bg:#d7e8e7;--tier-fg:#285854}.tier-c{--tier-bg:#efeacb;--tier-fg:#6e6034}.tier-d{--tier-bg:#f0dcd4;--tier-fg:#815341}.tier-p,.tier-u{--tier-bg:#e9ece7;--tier-fg:#5f6c60}.tier-lane-heading{display:flex;align-items:center;gap:14px;padding:14px 18px;border-bottom:1px solid var(--line);background:#fafcf5}.tier-letter{background:var(--tier-bg);color:var(--tier-fg);width:44px;height:44px;border-radius:6px;display:grid;place-items:center;font-size:24px;font-weight:700}.tier-lane-heading h3{margin:0;font-size:15px;font-weight:600}.tier-lane-heading p{font-size:11px;margin:1px 0 0;color:var(--muted)}.tier-lane-count{margin-left:auto;font-size:11px;color:var(--muted)}.tier-scroll{overflow-x:auto}.tier-row{display:grid;grid-template-columns:minmax(250px,2.5fr) minmax(92px,1fr) minmax(95px,1fr) repeat(4,minmax(65px,.7fr));align-items:center;gap:14px;min-width:850px;width:100%;padding:14px 18px;text-align:right}.tier-columns{font-size:9px;letter-spacing:.5px;color:var(--muted);background:#f7f9f2;padding-top:10px;padding-bottom:10px}.tier-row>:first-child{text-align:left}.player-row{border:0;border-bottom:1px solid #edf0e7;background:white;color:var(--ink);font-size:12px;font-variant-numeric:tabular-nums}.player-row:last-child{border-bottom:0}.player-row:hover,.player-row:focus-visible{background:#f3f8e8}.player-identity{display:grid;gap:4px}.player-identity strong{font-size:13px;font-weight:600}.player-identity small{font-size:10px;color:var(--muted);white-space:normal}.player-rating{display:grid;justify-items:end;gap:4px}.rating-pill{font-size:14px;font-weight:650;background:var(--tier-bg);color:var(--tier-fg);padding:4px 8px;border-radius:5px;min-width:48px;text-align:center}.player-rating small{font-size:9px;color:var(--muted)}dialog{width:min(1350px,95vw);max-height:92vh;border:1px solid var(--line);border-radius:12px;padding:26px;background:var(--paper);color:var(--ink);box-shadow:0 30px 90px #09251940}dialog::backdrop{background:#0c231cb3}.detail-heading{display:flex;justify-content:space-between;align-items:start;gap:20px}.detail-heading h2{font-size:28px;line-height:1.2}.detail-heading p:not(.eyebrow){font-size:12px;color:var(--muted);margin:8px 0 20px}.detail-heading .secondary{white-space:nowrap}.detail-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:var(--line);border:1px solid var(--line);border-radius:7px;overflow:hidden}.detail-summary>div{padding:15px;background:#fcfdf9;display:grid;gap:6px}.detail-summary span{font-size:9px;letter-spacing:.6px;color:var(--muted)}.detail-summary strong{font-size:23px;font-weight:550;font-variant-numeric:tabular-nums}.history-toolbar{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-top:25px}.history-toolbar h3{font-size:16px;margin:0;font-weight:600}.history-toolbar label{font-size:12px;display:flex;align-items:center;gap:8px}.history-toolbar input{min-height:0;accent-color:var(--ink)}.history-help{font-size:11px;color:var(--muted)}.history-table{max-height:48vh;border-top:1px solid var(--line)}.history-table th{position:sticky;top:0;padding:12px 14px;z-index:1;font-size:11px}.history-table td:first-child{font-weight:400}
@media(min-width:1700px){main{margin-right:auto}}@media(max-width:1100px){.rail{width:190px;padding:30px 16px}main{margin-left:190px;padding:0 25px}.filters{flex-wrap:wrap}.filters .search-label{flex-basis:100%}.page-heading{gap:20px}.stats>div{padding:18px 15px}}
@media(max-width:760px){.rail{position:static;width:100%;padding:16px 20px;display:block}.brand{font-size:9px}.brand strong{font-size:16px}.brand-mark{font-size:19px}.rail-label,.rail-note{display:none}nav{display:flex;margin-top:18px;gap:8px;flex-wrap:wrap}.nav-button{padding:10px;font-size:12px;flex:1;min-width:115px}.nav-button span{margin-right:4px}main{margin:0;padding:0 18px}.topbar{padding:18px 0;font-size:9px}.page-heading{align-items:start;flex-direction:column;padding:28px 0 18px;gap:22px}h1{font-size:36px}.file-actions{align-items:start}.stats{grid-template-columns:1fr 1fr;margin-bottom:22px}.stats>div:nth-child(2){border-right:0}.stats>div:nth-child(-n+2){border-bottom:1px solid var(--line)}.stats strong{font-size:25px}.stats .season-value{font-size:19px;margin-top:11px}.empty-state{padding:30px 16px}.empty-state h2{font-size:23px}.empty-state .file-list{flex-direction:column;align-items:center}.panel-heading{align-items:start}.filters{gap:10px}.filters label:not(.search-label){flex:1;min-width:120px}#minutes{width:100%}.table-footer,footer{align-items:start;flex-direction:column}.table-footer p{margin:0 0 5px}.pagination{align-self:flex-end}footer{gap:6px}.tier-intro{align-items:start;flex-direction:column}.tier-filters input[type=number]{width:100%}.tier-lane-heading{padding:12px}.tier-letter{width:36px;height:36px;font-size:20px}.tier-lane-count{font-size:10px}dialog{padding:16px;width:96vw;max-height:95vh}.detail-heading h2{font-size:23px}.detail-summary{grid-template-columns:1fr 1fr}.detail-summary strong{font-size:20px}.history-toolbar{align-items:start;flex-direction:column;gap:10px}}

/* Center the workspace independently of the navigation overlay. */
main {
  width: min(1220px, calc(100% - 160px));
  max-width: 1220px;
  margin: 0 auto;
  padding: 0;
}
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: 240px;
  max-width: 85vw;
  height: 100dvh;
  padding: 80px 22px 28px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 180ms ease, visibility 180ms;
}
.rail.is-open {
  transform: translateX(0);
  visibility: visible;
  box-shadow: 12px 0 40px #123e3026;
}
.rail.is-pinned { box-shadow: 12px 0 40px #123e3040; }
.rail nav { display: grid; gap: 7px; margin-top: 0; }
.rail .nav-button { min-width: 0; padding: 13px 12px; font-size: 13px; flex: none; }
.rail .rail-label { display: block; margin-top: 48px; }
.rail-section + .rail-section .rail-label { margin-top: 28px; }
.rail .rail-note { display: block; padding-top: 28px; }
.sidebar-toggle {
  position: fixed;
  z-index: 70;
  top: 18px;
  left: 18px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}
.sidebar-toggle:hover { background: #e8efd9; }
.sidebar-edge { position: fixed; z-index: 55; inset: 0 auto 0 0; width: 12px; }
.fixture-table-footer { flex-wrap: wrap; gap: 16px; }
.fixture-table-footer .pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; margin: 0; }
@media (max-width: 760px) {
  .fixture-table-footer .pagination { align-self: stretch; justify-content: flex-start; }
  .fixture-table-footer #page-label { flex-basis: 100%; order: -1; }
}
.rail a.nav-button { display: block; text-decoration: none; }
.detailed-standings { background: #fff; border: 1px solid var(--line); border-top: 3px solid #618975; border-radius: 9px; overflow: hidden; }
.detailed-standings .panel-heading { padding: 24px; margin: 0; }
.detailed-standings-scroll { max-height: none; }
.detailed-standings-scroll table { min-width: 830px; }
.detailed-standings-scroll th { position: sticky; top: 0; z-index: 1; }
.detailed-standings-scroll th, .detailed-standings-scroll td { padding: 13px 15px; }
.detailed-standings-scroll td:nth-child(2) { min-width: 190px; }
.detailed-points { font-size: 16px; font-weight: 750; background: transparent; }
.qualification-spot { position: relative; }
.qualification-marker { position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--qualification-color); }
.qualification-ucl { --qualification-color: #45d39a; }
.qualification-uel { --qualification-color: #3f7cff; }
.qualification-uecl { --qualification-color: #a848ff; }
.standings-form { display: flex; gap: 4px; min-width: 136px; }
.form-result { display: inline-grid; place-items: center; width: 24px; height: 25px; border-radius: 4px; text-decoration: none; font-size: 10px; font-weight: 700; }
.form-result:hover { outline: 2px solid currentColor; outline-offset: 1px; }
/* Win, draw and loss look the same everywhere: Puan Durumu's form, the team
   page's results, Maç Haftası's last five, the live table and every chart
   (--result-* below, dark values in theme-dark.css). */
.form-win, .result-w, .matchweek-form-result.matchweek-form-win { background: color-mix(in srgb, var(--result-win) 20%, var(--surface)); color: var(--result-win); }
.form-draw, .result-d, .matchweek-form-result.matchweek-form-draw { background: color-mix(in srgb, var(--result-draw) 20%, var(--surface)); color: var(--result-draw); }
.form-loss, .result-l, .matchweek-form-result.matchweek-form-loss { background: color-mix(in srgb, var(--result-loss) 20%, var(--surface)); color: var(--result-loss); }
.form-unknown { background: var(--surface-raised); color: var(--muted); }
.standings-legend { padding: 12px 24px 18px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.tier-board { display: block; }
.tier-ranking-scroll { border-top: 1px solid var(--line); border-radius: 8px; max-height: 72vh; }
.tier-ranking-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 15px 13px;
  font-size: 11px;
  font-weight: 600;
}
.tier-ranking-table td { padding: 15px 13px; height: 65px; }
.tier-ranking-table .rank-cell { color: var(--muted); min-width: 55px; }
.tier-ranking-table .role-cell { white-space: normal; min-width: 110px; max-width: 160px; font-size: 11px; color: var(--muted); }
.tier-ranking-table .player-cell { min-width: 190px; }
.player-name-button {
  display: block;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  text-align: left;
}
.player-name-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.tier-tag { display: inline-block; min-width: 29px; padding: 4px 8px; border-radius: 5px; text-align: center; font-size: 11px; font-weight: 650; background: var(--tier-bg); color: var(--tier-fg); }
.tier-ranking-table .rating-pill { display: inline-block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 760px) {
  main { width: calc(100% - 40px); margin: 0 auto; padding: 0; }
  .topbar { padding-left: 48px; min-height: 76px; gap: 10px; }
  .sidebar-toggle { top: 18px; left: 16px; }
  .tier-ranking-scroll { max-height: 68vh; }
}
@media (prefers-reduced-motion: reduce) { .rail { transition: none; } }

/* Local team crests, between rank and role. */
.tier-ranking-table .club-logo-heading { text-align: center; }
.tier-ranking-table .club-logo-heading,
.tier-ranking-table .club-logo-cell { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.tier-ranking-table .club-logo-cell { min-width: 64px; padding: 10px 12px; }
.club-logos { display: flex; align-items: center; justify-content: center; gap: 6px; }
.club-logos > * + * { border-left: 1px solid var(--line); padding-left: 6px; }
.club-logo { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; }
.club-logo img { display: block; width: 32px; height: 32px; object-fit: contain; opacity: 0; }
.club-logo img.loaded { opacity: 1; }
.club-logo-fallback { position: absolute; inset: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #f2f5eb; color: var(--muted); font-size: 9px; font-weight: 600; }

.team-link { color: inherit; text-decoration: none; border-radius: 3px; }
a.team-link:hover { color: #507624; text-decoration: underline; text-underline-offset: 3px; }
.team-logo-link { display: inline-flex; flex-shrink: 0; }
.team-logo-link:hover { background: #edf2e3; }
.home-match-team { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.team-page main { width: min(1040px, calc(100% - 40px)); }
.team-page .topbar { padding-left: 0; }
.team-page .team-page-heading { justify-content: flex-start; flex-direction: row; align-items: center; gap: 24px; }
.team-page-heading img { width: 72px; height: 72px; object-fit: contain; }
.team-page-heading h1 { overflow-wrap: anywhere; }
.team-page-content { min-height: 55vh; }

/* Home: a wide overview above standings on the left and fixtures on the right. */
.home-view main { width: min(1040px, calc(100% - 160px)); }
.home-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 36px; align-items: start; }
.home-panel { min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: white; overflow: hidden; }
.standings-panel { border-top: 3px solid #c86158; }
.fixtures-panel { border-top: 3px solid #5c71bb; }
.home-panel-heading { padding: 24px 22px 12px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.home-panel-heading .eyebrow { font-size: 9px; margin-bottom: 7px; }
.home-panel-heading h2 { font-size: 23px; }
.home-panel-note { font-size: 11px; color: var(--muted); padding: 0 22px; margin: 6px 0 17px; line-height: 1.7; }
.standings-scroll { overflow: auto; max-height: 880px; min-height: 360px; }
.standings-table th { position: sticky; top: 0; z-index: 1; padding: 13px 15px; font-size: 10px; }
.standings-table td { padding: 10px 15px; }
.standing-position { width: 45px; color: var(--muted); font-size: 11px; }
.standing-club { display: flex; align-items: center; gap: 11px; font-size: 12px; font-weight: 550; white-space: normal; }
.standing-club .club-logo { width: 30px; height: 30px; flex-basis: 30px; }
.standing-club .club-logo img { width: 27px; height: 27px; }
.standing-points { font-weight: 700; font-size: 14px; }
.standings-group-control { display: grid; gap: 6px; margin: 8px 22px 16px; font-size: 11px; color: var(--muted); }
.matchweek-controls { display: flex; align-items: center; gap: 9px; padding: 6px 22px 8px; }
.matchweek-controls select { flex: 1; min-width: 0; background: #f5f7f0; text-align: center; font-weight: 600; }
.matchweek-controls .secondary { min-height: 38px; }
.home-fixtures-list { padding: 0 22px 24px; max-height: 780px; min-height: 290px; overflow: auto; }
.fixture-date { font-size: 10px; letter-spacing: .7px; color: var(--muted); padding: 13px 0 8px; margin: 0; font-weight: 600; }
.home-match { border: 1px solid var(--line); border-radius: 7px; padding: 12px 15px; margin-bottom: 10px; }
.home-match-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 10px; color: var(--muted); margin-bottom: 8px; }
.fixture-status { background: #f1f4e9; border-radius: 3px; padding: 2px 6px; text-align: right; }
.home-match-side { display: flex; align-items: center; gap: 10px; min-height: 37px; }
.home-match-side .club-logo { width: 26px; height: 26px; flex-basis: 26px; }
.home-match-side .club-logo img { width: 24px; height: 24px; }
.home-match-club { font-size: 12px; font-weight: 550; flex: 1; min-width: 0; }
.home-match-score { font-size: 15px; min-width: 20px; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .home-grid { gap: 20px; }
  .home-panel-heading { padding: 20px 15px 10px; }
  .home-panel-note { padding: 0 15px; }
  .home-panel-heading h2 { font-size: 20px; }
  .home-fixtures-list { padding: 0 15px 18px; }
  .matchweek-controls { padding-left: 15px; padding-right: 15px; }
  .standing-club { gap: 7px; }
  .standings-table td, .standings-table th { padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 760px) {
  .home-view main { width: calc(100% - 40px); }
  .home-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .home-panel-heading { padding: 22px 20px 12px; }
  .home-panel-note { padding: 0 20px; }
  .home-fixtures-list { max-height: 650px; padding: 0 20px 20px; }
  .matchweek-controls { padding-left: 20px; padding-right: 20px; }
}

/* View-specific status visibility; every view keeps the shared page header. */
.standings-view #message { display: none; }

/* Fixture page: full season grouped by matchweek. */
.fixtures-view #message { display: none; }
.fixtures-view #workspace {
  border: 1px solid var(--line);
  border-top: 3px solid #5c71bb;
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
}
.fixtures-view #workspace > .panel-heading { margin: 0; padding: 24px; }
.fixtures-view #table-caption,
.fixtures-view #result-count,
.fixtures-view #workspace > .filters,
.fixtures-view .fixture-table-footer,
.fixtures-view #workspace > .context-note { display: none; }
.fixtures-view #workspace > .table-container { min-height: 0; border: 0; border-top: 1px solid var(--line); }
.fixtures-view #workspace table { min-width: 650px; }
.fixtures-view #table-head th { padding: 13px 16px; font-size: 10px; font-weight: 600; }
.fixture-time-heading,
.fixture-time-cell { width: 90px; color: var(--muted); }
.fixture-home-heading,
.fixture-home-cell { text-align: right; }
.fixture-score-heading,
.fixture-score-cell { width: 90px; text-align: center; }
.fixture-score-cell { font-size: 15px; font-weight: 750; }
.fixture-team-link { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 600; }
.fixture-home-team { flex-direction: row-reverse; }
.fixture-team-link:hover span { text-decoration: underline; text-underline-offset: 3px; }
.fixture-team-link .club-logo { width: 31px; height: 31px; flex-basis: 31px; }
.fixture-team-link .club-logo img { width: 28px; height: 28px; }
.fixture-matchweek-row td {
  padding: 13px 16px;
  border-top: 1px solid var(--matchweek-border);
  border-bottom: 1px solid var(--matchweek-border);
  background: var(--matchweek-bg);
  color: var(--matchweek-text);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.fixture-matchweek-row:first-child td { border-top: 0; }
.fixture-matchweek-row:hover td { background: var(--matchweek-bg); }
.fixture-game-row td { padding-top: 12px; padding-bottom: 12px; }
.fixture-game-row.zebra-purple,
#detailed-standings-body > tr:nth-child(odd) { background: var(--zebra-purple); }
.fixture-game-row.zebra-light,
#detailed-standings-body > tr:nth-child(even) { background: var(--zebra-light); }
.fixture-game-row:hover,
#detailed-standings-body > tr:hover { background: var(--zebra-hover); }

@media (max-width: 760px) {
  .fixtures-view #workspace { margin-top: 20px; }
  .fixtures-view #workspace > .panel-heading { padding: 20px 16px; }
  .fixture-team-link { gap: 7px; }
}

/* Shared light/dark appearance. Light remains the default. */
:root {
  --surface: #fff;
  --surface-raised: #fbfcf8;
  --surface-soft: #ecf0e6;
  --surface-hover: #f3f8e8;
  --field: #fff;
  --focus: #739b2f;
  --zebra-purple: #eadcf7;
  --zebra-light: #f8f3fc;
  --zebra-hover: #dfc9f2;
  --matchweek-bg: #d5b8ed;
  --matchweek-border: #c49de4;
  --matchweek-text: #4b2369;
  --result-win: #1d9a68;
  --result-draw: #b88a00;
  --result-loss: #d23f3f;
}

/* Player Tier List: compact role, team and expanding player-search controls. */
.tiers-view #message { display: none; }
.tier-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}
.tier-role-filter {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border-radius: 7px;
  background: #241e45;
}
.tier-role-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 5px;
  border: 0;
  border-radius: 5px;
  background: transparent;
}
.tier-role-button:hover { background: #3c356c; }
.tier-role-button[aria-pressed="true"] { background: #514781; box-shadow: inset 0 0 0 1px #8b83cc66; }
.tier-role-button img { display: block; width: 24px; height: 24px; }
.tier-team-filter { display: block; }
.tier-team-filter select { min-width: 190px; min-height: 48px; }
.tier-search-control {
  display: flex;
  align-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--field);
  transition: width 220ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.tier-search-control:focus-within { border-color: var(--focus); box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus) 28%, transparent); }
.tier-search-control.is-open { width: min(310px, 100%); }
#tier-search-toggle,
#tier-search-close {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}
#tier-search-toggle:hover,
#tier-search-close:hover { background: var(--surface-hover); }
#tier-search-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
#tier-search-close { flex-basis: 38px; width: 38px; color: var(--muted); font-size: 21px; }
#tier-search {
  flex: 0 1 0;
  width: 0;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  opacity: 0;
  background: transparent;
  transition: opacity 140ms ease;
}
.tier-search-control.is-open #tier-search { flex: 1 1 auto; width: auto; padding: 8px 4px; opacity: 1; }
#tier-search:focus-visible { outline: 0; }
.tier-ranking-table tbody tr.zebra-purple { background: var(--zebra-purple); }
.tier-ranking-table tbody tr.zebra-light { background: var(--zebra-light); }
.tier-ranking-table tbody tr.zebra-purple:hover,
.tier-ranking-table tbody tr.zebra-light:hover { background: var(--zebra-hover); }
.tier-pagination-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 2px 0;
}
.tier-page-size { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.tier-page-size select { width: 72px; min-height: 36px; padding: 6px 8px; }
.tier-page-range { color: var(--muted); font-size: 11px; white-space: nowrap; }
.tier-pagination { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.tier-pagination .secondary { min-height: 36px; padding: 7px 10px; gap: 5px; }
.tier-page-buttons { display: inline-flex; align-items: center; gap: 5px; }
.tier-page-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
}
.tier-page-number:hover { background: var(--surface-hover); }
.tier-page-number[aria-current="page"] { border-color: #7752a3; background: #7752a3; color: #fff; font-weight: 700; }
.tier-page-ellipsis { display: inline-grid; place-items: center; width: 22px; color: var(--muted); }

@media (max-width: 760px) {
  .tiers-view #tier-workspace { margin-top: 20px; }
  .tier-toolbar { align-items: stretch; }
  .tier-role-filter { order: 1; }
  .tier-team-filter { order: 2; flex: 1; }
  .tier-team-filter select { width: 100%; min-width: 145px; }
  .tier-search-control { order: 3; }
  .tier-search-control.is-open { flex-basis: 100%; width: 100%; }
  .tier-pagination-bar { align-items: flex-start; flex-wrap: wrap; }
  .tier-pagination { width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 3px; }
}

@media (prefers-reduced-motion: no-preference) {
  body,
  .rail,
  .sidebar-toggle,
  .home-panel,
  .team-panel,
  .builder-pitch-panel,
  .builder-pool,
  .table-container,
  input,
  select { transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease; }
}

/* The rail is a fixed 240px overlay on the left, but `main` is centred on the
   whole viewport, so the two only clear each other once the centred left margin
   exceeds 240px - which happens at about 1700px. Below that the rail sits on top
   of the content. Reserve its width instead. The reserve does not depend on
   whether the rail is open, so toggling it still never moves the page.
   Above 1700px nothing here applies and the layout is unchanged. */
@media (min-width: 1101px) and (max-width: 1700px) {
  main { width: min(1220px, calc(100% - 320px)); margin-left: 240px; margin-right: auto; }
  .home-view main { width: min(1040px, calc(100% - 320px)); }
  .team-page main { width: min(1040px, calc(100% - 300px)); }
}
/* The sidebar is open by default from tablet width up, so it reserves its
   width there too instead of covering the page. */
@media (min-width: 761px) and (max-width: 1100px) {
  main,
  .home-view main,
  .team-page main { width: calc(100% - 280px); margin-left: 256px; margin-right: 24px; }
}

/* CANLI beside Maç Haftası: the live centre's own badge (live-centre.css), placed. */
.nav-live { margin-left: 8px; vertical-align: 1px; }
