/* Ana Sayfa: matches and standings on the left, the chosen match in the
   middle, and events and chat on the right. Panels
   are the site's .home-panel; club colours arrive as --matchweek-home and
   --matchweek-away (set by home.js from teamColorPair), as on Maç Haftası.

   The yellow and red of a card are pictures of the cards, like the pitch's
   grass, so they are the same in both themes. */
:root {
  --home-card-yellow: #f5c518;
  --home-card-red: #e5484d;
  /* The pressure strip's slider, its line on the chart, and the event it lights. */
  --home-event-marker: #d6407f;
  --home-event-highlight: #fde4ef;
  /* The chat: the visitor's messages, the send icon, the entry box. */
  --home-chat-user: #c8f1ee;
  --home-chat-user-ink: #0e4a47;
  --home-chat-accent: #12a29d;
  --home-chat-entry: #eef2f5;
  --home-chat-dot: #9060d5;
  --home-chat-dot-halo: rgba(144, 96, 213, 0.22);
}
:root[data-theme="dark"] {
  --home-event-marker: #f48fb1;
  --home-event-highlight: rgba(244, 143, 177, 0.2);
  --home-chat-user: rgba(64, 224, 208, 0.22);
  --home-chat-user-ink: #dcfbf7;
  --home-chat-accent: #4fd8cd;
  --home-chat-entry: #252831;
  --home-chat-dot: #b785f5;
  --home-chat-dot-halo: rgba(183, 133, 245, 0.25);
}

/* The page is as wide as every other page (styles.css). The two outer columns
   share one width, so they are always equal. The match's four parts - score,
   pressure strip, statistics with İlk 11'ler, the six cards - each take one
   row of the layout (a subgrid), so the right column's panels line up with
   them: the top one beside the score and pressure strip, the bottom one beside statistics and İlk
   11'ler. The left column runs down every row at its own height. A subgrid
   cannot also be a size container, so each part's row (.home-row) is the
   container its cards size themselves against; it is as wide as the match
   column, so the widths below mean the same as before. */
.home-dashboard { container-type: inline-size; margin-bottom: 40px; --home-side-width: 250px; }
/* Ana Sayfa opens straight on its dashboard: the page header every other page
   shows is hidden here, kept only for screen readers (the page's title). The
   dashboard starts below the fixed menu button (18px from the top, 40px tall,
   styles.css), which the header used to leave room for. */
.home-view .page-header { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.home-view .home-dashboard { margin-top: 72px; }
.home-layout {
  display: grid;
  grid-template-columns: var(--home-side-width) minmax(0, 1fr) var(--home-side-width);
  grid-template-rows: repeat(4, auto);
  gap: 20px;
  align-items: start;
}
.home-side { grid-column: 1; grid-row: 1 / -1; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 20px; min-width: 0; }
.home-detail { grid-column: 2; grid-row: 1 / -1; display: grid; grid-template-rows: subgrid; gap: 20px; align-self: stretch; min-width: 0; }
.home-detail:focus { outline: none; }
.home-row { display: grid; min-width: 0; container: home-detail / inline-size; }
.home-reserved { grid-column: 3; align-self: stretch; min-width: 0; }
.home-reserved-top { grid-row: 1 / 3; }
.home-reserved-bottom { grid-row: 3; }
/* With no match chosen there is nothing for the bottom panel to stand beside. */
.home-detail:has(.home-empty) ~ .home-reserved-bottom { display: none; }
/* Maç Olayları: the chosen match's events as text, in Maç Haftası's rows
   (live-centre.css). The panel is as tall as the score and pressure strip
   beside it - contain: size keeps a long list from stretching them - and the
   list scrolls inside it. */
.home-events { contain: size; display: flex; flex-direction: column; overflow: hidden; }
.home-live-events-title { display: none; }
/* The list scrolls (wheel, touch, keyboard) with no scrollbar drawn. */
.home-events ol { flex: 1 1 auto; min-height: 0; max-height: none; margin: 10px; padding: 0; scrollbar-width: none; }
.home-events ol::-webkit-scrollbar { display: none; }
/* The event the pressure strip's slider points at is lit in light pink. */
.home-events .live-event, .home-events .live-event:first-child { padding: 10px 8px; border-radius: 6px; transition: background-color 0.15s; }
.home-events .live-event.is-current { background: var(--home-event-highlight); }
.home-events .live-event.is-latest-live { background: var(--home-event-highlight); box-shadow: inset 2px 0 var(--home-event-marker); }

/* Asistan: a chat in the right column, beside statistics and İlk 11'ler (for
   now a demo, home-chat.js). Like Maç Olayları it takes its height from its
   row - contain: size - and its messages scroll inside it with no scrollbar
   drawn. The visitor's messages are turquoise, the assistant's the soft
   surface; both have their dark shades. */
.home-chat { contain: size; display: flex; flex-direction: column; }
.home-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.home-chat-head h2 { font-size: 16px; }
/* Which AI answers: a two-way switch. */
.home-chat-provider { display: inline-flex; padding: 2px; border-radius: 999px; background: var(--home-chat-entry); }
.home-chat-provider button { padding: 3px 9px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 600; }
/* The chosen AI in its own brand colour: Claude's coral, ChatGPT's green. */
.home-chat-provider button[aria-pressed="true"] { color: #fff; }
.home-chat-provider button[data-provider="claude"][aria-pressed="true"] { background: #d97757; }
.home-chat-provider button[data-provider="openai"][aria-pressed="true"] { background: #10a37f; }
.home-chat-provider button:disabled { opacity: 0.6; }
.home-chat-messages { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 12px; list-style: none; overflow-y: auto; scrollbar-width: none; }
.home-chat-messages::-webkit-scrollbar { display: none; }
.home-chat-message { max-width: 85%; padding: 8px 11px; border-radius: 12px; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.home-chat-message p { margin: 0; white-space: pre-wrap; }
.home-chat-message.is-assistant { align-self: flex-start; border-bottom-left-radius: 4px; background: var(--surface-soft); color: var(--ink); }
.home-chat-message.is-assistant.has-table { align-self: stretch; min-width: 0; max-width: none; }
.home-chat-table { --cell-pad: 5px 6px; color: var(--ink); white-space: normal; background: var(--surface); }
.home-chat-message p + .home-chat-table, .home-chat-table + p { margin-top: 8px; }
#home-chat .home-chat-table :is(th, td) {
  padding: var(--cell-pad); border-bottom: 1px solid var(--line); font-size: inherit;
  text-align: start; vertical-align: top; overflow-wrap: anywhere;
}
#home-chat .home-chat-table th { position: sticky; top: 0; z-index: 1; font-weight: 650; color: var(--ink); background: var(--surface-raised); }
#home-chat .home-chat-table .is-number { width: 1%; text-align: end; overflow-wrap: normal; font-variant-numeric: tabular-nums; }
.home-chat-table tbody tr:hover { background: var(--surface-hover); }
.home-chat-message.is-error { align-self: flex-start; border: 1px solid var(--result-loss); background: transparent; color: var(--ink); }
.home-chat-meta { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
/* The request to sign in, with its button, once a guest's questions are used. */
.home-chat-message.is-login { align-self: stretch; max-width: none; border: 1px solid var(--home-chat-accent); background: transparent; color: var(--ink); }
.home-chat-login { margin-top: 8px; padding: 6px 14px; border: 0; border-radius: 999px; background: var(--home-chat-accent); color: var(--surface); font-size: 12px; font-weight: 600; }
.home-chat-note { margin: 0 14px 2px; color: var(--muted); font-size: 10.5px; }
.home-chat-message.is-user { align-self: flex-end; border-bottom-right-radius: 4px; background: var(--home-chat-user); color: var(--home-chat-user-ink); }
/* While an answer is on its way: three purple dots, each with a soft halo,
   jumping one after another. */
.home-chat-dots { display: inline-flex; align-items: flex-end; gap: 7px; height: 22px; padding: 2px 4px 4px; }
.home-chat-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--home-chat-dot);
  box-shadow: 0 0 0 3px var(--home-chat-dot-halo); animation: home-chat-dot 1.1s infinite ease-in-out; }
.home-chat-dots i:nth-child(2) { animation-delay: 0.16s; }
.home-chat-dots i:nth-child(3) { animation-delay: 0.32s; }
@keyframes home-chat-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.55; }
  30% { transform: translateY(-8px); opacity: 1; }
}
/* Visitors who ask for less motion (an operating-system setting) get the dots
   fading in turn instead of jumping. */
@keyframes home-chat-dot-fade { 0%, 60%, 100% { opacity: 0.4; } 30% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .home-chat-dots i { animation-name: home-chat-dot-fade; } }
.home-chat-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 10px; }
.home-chat-suggestion { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font-size: 11px; text-align: left; }
.home-chat-suggestion:hover { background: var(--surface-hover); }
/* The entry: one rounded box, the text on the left and a paper plane inside it on the right. */
.home-chat-form { display: flex; align-items: flex-end; gap: 6px; margin: 4px 12px 12px; padding: 4px 6px 4px 14px; border-radius: 12px; background: var(--home-chat-entry); }
.home-chat-form:focus-within { outline: 2px solid var(--home-chat-accent); outline-offset: 1px; }
.home-chat-form textarea { flex: 1 1 auto; min-width: 0; min-height: 36px; max-height: 96px; padding: 9px 0; border: 0; background: transparent;
  color: var(--ink); font: inherit; font-size: 12px; line-height: 1.5; resize: none; }
.home-chat-form textarea::placeholder { color: var(--muted); }
.home-chat-form textarea:focus, .home-chat-form textarea:focus-visible { outline: none; }
.home-chat-form button { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--home-chat-accent); }
.home-chat-form button:not(:disabled):hover { background: var(--surface-hover); }
.home-chat-form button svg { width: 20px; height: 20px; fill: currentColor; }
/* Statistics and elevens side by side, always the same height. */
.home-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
/* Below them, six cards of one size: the same two halves, three rows that
   share one height (1fr rows take the tallest card's), filled column by column
   so the season cards sit under the statistics and the match's battles under
   İlk 11'ler. Fiziksel Mücadele sets the size; the other five are kept no
   taller. */
.home-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, 1fr); grid-auto-flow: column; gap: 20px; }

@container (max-width: 1100px) {
  .home-layout { grid-template-columns: var(--home-side-width) minmax(0, 1fr); }
  .home-reserved { display: none; }
  .home-events.has-match { display: flex; grid-column: 2; grid-row: 5; block-size: 18rem; }
  .home-live-events-title { display: block; margin: 14px 16px 0; font-size: 16px; }
}
@container (max-width: 700px) {
  /* One column: the chosen match first, then the list to choose from. */
  .home-layout { grid-template-columns: minmax(0, 1fr); }
  .home-detail { grid-column: 1; }
  .home-side { grid-column: 1; grid-row: 5; }
  .home-events.has-match { grid-column: 1; }
  .home-layout:has(.home-events.has-match) .home-side { grid-row: 6; }
}
@container home-detail (max-width: 600px) {
  .home-pair { grid-template-columns: minmax(0, 1fr); }
  .home-more { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; grid-auto-rows: 1fr; }
  /* Alone in its row, the pitch has no neighbour to match, so it keeps a
     pitch-like shape of its own. */
  .home-lineups .home-pitch { min-height: 480px; }
}

/* Cards in the match column */
.home-card { padding-bottom: 14px; }
.home-card .home-panel-heading { padding: 18px 18px 8px; }
.home-card > :not(.home-panel-heading, .home-momentum-scroll) { margin-left: 18px; margin-right: 18px; }
.home-card-note { margin-top: 12px; margin-bottom: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.home-empty { padding: 28px 18px; }

/* Played matches */
/* The week: arrows either side of the picker, as on the team page's match
   picker. The note only speaks when there is nothing to list. */
.home-games-panel .home-panel-heading { gap: 8px; }
.home-simulation-button { min-height: 32px; padding: 5px 8px; line-height: 1.25; font-size: 11px; background: var(--surface-raised); }
.home-simulation-button:hover { background: var(--surface-hover); }
.home-simulation-button[data-active="true"] { border-color: var(--accent); }
.home-week-control { display: flex; align-items: center; gap: 8px; margin: 0 22px 14px; }
.home-week-control label { flex: 1; min-width: 0; }
.home-week-control select { width: 100%; }
.home-week-control .secondary { min-height: 38px; padding: 8px 12px; }
.home-games-panel .home-panel-note:empty { display: none; }
/* Extra live games can scroll within the height of the selected week's list. */
.home-games-list { padding: 0 12px 14px; --home-game-height: 60px; --home-game-gap: 6px; }
.home-games-list.has-other-week {
  max-block-size: calc(14px + var(--home-week-games) * (var(--home-game-height) + var(--home-game-gap)));
  overflow-y: auto;
  scrollbar-width: none;
}
.home-game {
  display: grid;
  gap: 5px;
  width: 100%;
  min-block-size: var(--home-game-height);
  margin: 0 0 var(--home-game-gap);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  text-align: left;
}
.home-game:hover { background: var(--surface-hover); }
/* The week's matches still to play: listed, greyed, nothing to open. */
.home-game-upcoming { border-style: dashed; background: transparent; color: var(--muted); }
.home-game-upcoming:hover { background: transparent; }
.home-game-upcoming .club-logo { opacity: .6; }
.home-game[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 3px 0 var(--accent); }
.home-game-meta { min-width: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.home-game-live .home-game-meta { color: var(--ink); font-weight: 700; }
.home-game-line { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; }
.home-game-team { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; font-weight: 600; }
.home-game-team > span:not(.club-logo) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-game-away { justify-content: flex-end; }
.home-game .club-logo { width: 22px; height: 22px; flex: 0 0 22px; }
.home-game .club-logo img { width: 20px; height: 20px; }
.home-game-score { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Puan Durumu in the side column, laid out like a club app's table: place,
   crest and name under one "Takım" heading, then played, won and points as
   plain muted figures. Tall rows with no lines between them, only the zebra
   stripes, in both themes. The figure columns are as narrow as their numbers,
   so most names fit on one line; the two or three longest wrap onto a second
   within the same row height. The rules that compete with the dark theme's
   general table rules (the strongest names an id and three classes) start
   with :is(:root, :root[data-theme]) .home-side #home-standings: as strong,
   and later, so they win in either theme. */
.home-side .standings-scroll { max-height: none; min-height: 0; }
.home-standings-table { table-layout: fixed; width: 100%; }
.home-standing-rank { width: 30px; }
.home-standing-figure { width: 24px; }
.home-standing-total { width: 40px; }
:is(:root, :root[data-theme]) .home-side #home-standings :is(th, td):not(.no-results) { padding: 0 4px; border: 0; line-height: 1.2; }
:is(:root, :root[data-theme]) .home-side #home-standings :is(th, td):first-child { padding-left: 10px; }
:is(:root, :root[data-theme]) .home-side #home-standings :is(th, td):last-child { padding-right: 10px; }
:is(:root, :root[data-theme]) .home-side #home-standings thead th { position: static; height: 34px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
:is(:root, :root[data-theme]) .home-side #home-standings tbody td { height: 44px; font-size: 12px; }
.home-standings-table .standing-position { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.home-standings-table .standing-club { gap: 7px; font-size: 12px; font-weight: 600; }
.home-standings-table .standing-club > span:last-child { min-width: 0; overflow-wrap: normal; }
.home-standings-live-label { color: var(--result-win); }
.home-standings-table .standing-team-label > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-standings-table .standing-club .club-logo { width: 24px; height: 24px; flex-basis: 24px; }
.home-standings-table .standing-club .club-logo img { width: 22px; height: 22px; }
.home-standings-table td.numeric { color: var(--muted); font-variant-numeric: tabular-nums; }
.home-standings-table .standing-points { font-size: inherit; font-weight: 500; }
.home-standings-table td.standing-live { font-weight: 800; }
.home-standings-table td.standing-live-win { color: var(--result-win); }
.home-standings-table td.standing-live-draw { color: var(--result-draw); }
.home-standings-table td.standing-live-loss { color: var(--result-loss); }
:is(:root, :root[data-theme]) .home-side #home-standings tbody > tr:nth-child(odd) > td { background: var(--zebra-purple); }
:is(:root, :root[data-theme]) .home-side #home-standings tbody > tr:nth-child(even) > td { background: var(--zebra-light); }
:is(:root, :root[data-theme]) .home-side #home-standings tbody > tr:hover > td { background: var(--zebra-hover); }

/* Result */
.home-scoreboard { padding: 32px 18px 24px; }
.home-score-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(7.25rem, 24%, 9rem) minmax(0, 1fr); align-items: center; gap: 16px; }
.home-score-team { display: grid; justify-items: center; gap: 8px; min-width: 0; text-align: center; }
.home-score-team .club-logo { width: 84px; height: 84px; flex-basis: 84px; }
.home-score-team .club-logo img { width: 76px; height: 76px; }
.home-score-name { max-width: 100%; overflow: hidden; font-size: 17px; font-weight: 600; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.home-score-role { max-width: 100%; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.home-score-middle { display: grid; justify-items: center; gap: 4px; min-width: 0; }
.home-score-value { font-size: 52px; font-weight: 650; line-height: 1; letter-spacing: -1px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.home-score-state { color: var(--muted); font-size: 12px; line-height: 1.4; text-align: center; text-wrap: balance; }
.home-score-venue { min-block-size: 1lh; margin: 22px 0 0; overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 600; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.home-chips { display: flex; justify-content: safe center; gap: 8px; min-block-size: 27px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.home-chip { flex: none; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-raised); color: var(--muted); font-size: 11px; white-space: nowrap; }
/* The ground's photo behind the result, under a dark tint. Like the pitch, it
   is a picture with its own white ink, the same in both themes. */
.home-scoreboard-photo { position: relative; isolation: isolate; }
.home-scoreboard-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #0a0610a6 0%, #0a0610cc 70%, #0a0610e6 100%), var(--home-stadium) center / cover no-repeat;
}
.home-scoreboard-photo :is(.home-score-name, .home-score-value, .home-score-venue) { color: #fff; text-shadow: 0 1px 3px #000c; }
.home-scoreboard-photo :is(.home-score-role, .home-score-state) { color: #ffffffcc; text-shadow: 0 1px 2px #000c; }
.home-scoreboard-photo .home-chip { border-color: #ffffff38; background: #0a0610a6; color: #ffffffd9; }
.home-scoreboard-photo .club-logo { filter: drop-shadow(0 2px 4px #0009); }

@container home-detail (max-width: 520px) {
  .home-score-grid { gap: 8px; }
  .home-score-team .club-logo { width: 48px; height: 48px; flex-basis: 48px; }
  .home-score-team .club-logo img { width: 44px; height: 44px; }
  .home-score-name { display: -webkit-box; block-size: 2lh; font-size: 13px; overflow-wrap: anywhere; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .home-score-value { font-size: 36px; }
}

/* Pressure balance: a low strip that is all chart, with no title row or
   legend; how to read it is the chart's hover text. The chart's sizes are in
   its own units, about one pixel each at desktop width. */
.home-card.home-momentum { position: relative; padding: 10px 0 8px; }
.home-momentum-status { position: absolute; inset: 0; display: grid; place-content: center; color: var(--muted); font-size: 11px; text-align: center; pointer-events: none; }
.home-momentum-scroll { overflow-x: auto; padding: 0 18px; scrollbar-width: none; }
.home-momentum-track { position: relative; min-width: 480px; }
.home-momentum-chart { display: block; width: 100%; height: auto; }
/* The slider spans the chart's minutes only: --plot-left and --plot-right are
   the chart's label margin and right edge as shares of its width (home.js).
   The 8px either side lets the thumb's centre, not its edge, reach each end. */
.home-momentum-slider { display: block; box-sizing: border-box; width: calc(100% - var(--plot-left) - var(--plot-right) + 16px);
  height: 16px; margin: 0 0 0 calc(var(--plot-left) - 8px); padding: 0; accent-color: var(--home-event-marker); cursor: pointer; }
.home-momentum-control { position: relative; margin-top: 4px; }
.home-momentum-control:has(.home-momentum-live) { margin-top: 24px; }
.home-momentum-live { position: absolute; inset: 0; color: var(--result-loss); pointer-events: none; }
.home-momentum-live::before { content: ""; position: absolute; left: var(--live-position); top: 50%; width: 3px; height: 12px;
  border-radius: 2px; background: currentColor; transform: translate(-50%, -50%); }
.home-momentum-live.is-under-thumb::before { visibility: hidden; }
.home-momentum-live-label { position: absolute; left: clamp(3rem, var(--live-position), calc(100% - 3rem)); bottom: calc(100% + 8px);
  padding: 1px 5px; border-radius: 4px; background: var(--surface-raised); font-size: 10px; font-weight: 700;
  line-height: 1.4; white-space: nowrap; transform: translateX(-50%); }
.home-momentum-cursor { stroke: var(--home-event-marker); stroke-width: 1.5; pointer-events: none; }
.home-replay-future { visibility: hidden; }
.home-momentum-chart text { font-family: inherit; }
.home-momentum-tick { fill: var(--muted); font-size: 9px; }
.home-momentum-team { fill: var(--ink); font-size: 10px; font-weight: 700; }
.home-momentum-lane { fill: var(--muted); font-size: 8px; font-weight: 600; }
.home-momentum-label { fill: var(--ink); font-size: 9.5px; font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 2.5px; stroke-linejoin: round; }
.home-momentum-axis { stroke: var(--muted); stroke-width: 0.75; }
.home-momentum-half { stroke: var(--muted); stroke-width: 0.75; stroke-dasharray: 2 2; }
.home-momentum-ball { stroke: var(--surface); stroke-width: 1; }
.home-momentum-sub { fill: var(--muted); font-size: 9px; }
.home-card-yellow { fill: var(--home-card-yellow); }
.home-card-red { fill: var(--home-card-red); }
.home-card-second { fill: var(--home-card-red); stroke: var(--home-card-yellow); stroke-width: 1.5; }

/* Match statistics: Maç Haftası's versus rows. */
.home-statistics .matchweek-versus-head .club-logo { width: 20px; height: 20px; flex: 0 0 20px; }
.home-statistics .matchweek-versus-head .club-logo img { width: 18px; height: 18px; }
.home-statistics > .home-card-note { block-size: 2lh; overflow-y: auto; }

/* Fiziksel Mücadele and Duran Top ve Akan Oyun: Maç Haftası's versus header,
   then bars growing out from the label in the middle towards each club, the
   larger value in full colour and the smaller faded. Numbers stay in ink, on
   the far side of their bar. */
.home-physical .matchweek-versus-head .club-logo,
.home-set-pieces .matchweek-versus-head .club-logo,
.home-phases .matchweek-versus-head .club-logo { width: 20px; height: 20px; flex: 0 0 20px; }
.home-physical .matchweek-versus-head .club-logo img,
.home-set-pieces .matchweek-versus-head .club-logo img,
.home-phases .matchweek-versus-head .club-logo img { width: 18px; height: 18px; }
.home-mirror-row { display: grid; grid-template-columns: minmax(0, 1fr) 11em minmax(0, 1fr); align-items: center; column-gap: 10px; padding: 5px 0; border-top: 1px solid var(--line); }
.home-mirror-label { color: var(--muted); font-size: 11px; line-height: 1.3; text-align: center; }
.home-mirror-side { display: flex; align-items: center; gap: 6px; min-width: 0; }
.home-mirror-home { justify-content: flex-end; }
.home-mirror-side b { flex: none; min-width: 2.4em; font-size: 13px; font-variant-numeric: tabular-nums; }
.home-mirror-home b { text-align: right; }
/* The bar's room is its half less the number beside it (2.4em and the gap). */
.home-mirror-bar { display: block; flex: none; width: calc((100% - 2.4em - 6px) * var(--share)); height: 10px; border-radius: 3px; }
.home-mirror-home .home-mirror-bar { background: var(--matchweek-home); }
.home-mirror-away .home-mirror-bar { background: var(--matchweek-away); }
.home-mirror-behind { opacity: .5; }
/* In a narrow card (half the match column, or a phone) the label wraps so the
   bars keep some length. The card's own width decides. */
.home-physical, .home-set-pieces { container: home-mirror / inline-size; }
@container home-mirror (max-width: 440px) {
  .home-mirror-row { grid-template-columns: minmax(0, 1fr) 6.5em minmax(0, 1fr); column-gap: 6px; }
  .home-mirror-side b { min-width: 2em; font-size: 12px; }
  .home-mirror-bar { width: calc((100% - 2em - 6px) * var(--share)); }
}

/* The season cards mark each club with a dot in its colour; a small legend
   names them. The away dot has a ring so it shows when the two overlap. */
.home-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.home-dot-home { background: var(--matchweek-home); }
.home-dot-away { background: var(--matchweek-away); box-shadow: 0 0 0 1.5px var(--surface); }
.home-dot-legend { display: flex; gap: 14px; color: var(--muted); font-size: 11px; font-weight: 600; }
.home-dot-legend-item { display: inline-flex; align-items: center; gap: 6px; }

/* Sezona Göre Bu Maç: a track per measure from the club's lowest match this
   season (left) to its highest (right), a dot where this match falls. */
.home-rank-scale { display: flex; justify-content: space-between; margin: 10px 0 2px 6.8em; color: var(--muted); font-size: 10px; }
.home-rank-row { display: grid; grid-template-columns: 6.3em minmax(0, 1fr); align-items: center; column-gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); }
.home-rank-label { color: var(--muted); font-size: 11px; line-height: 1.3; }
/* The home dot sits a little above the line and the away dot a little below,
   so both show when the two matches fall in the same place. */
.home-rank-track { position: relative; height: 16px; margin: 0 6px; }
.home-rank-track::before { content: ""; position: absolute; inset: 5px -6px; border-radius: 3px; background: var(--surface-soft); }
.home-rank-track .home-dot { position: absolute; top: 0; transform: translateX(-50%); }
.home-rank-track .home-dot-away { top: 6px; }

/* Ligde Pas Tarzı: the season's team-matches in grey, this match's two in
   their club colours. */
.home-passing-chart { display: block; width: 100%; height: auto; }
.home-passing-chart text { font-family: inherit; }
.home-passing-grid { stroke: var(--line); stroke-width: 0.6; }
.home-passing-tick { fill: var(--muted); font-size: 8px; }
.home-passing-axis { fill: var(--muted); font-size: 8.5px; font-weight: 600; }
.home-passing-corner { fill: var(--muted); font-size: 8px; font-style: italic; opacity: .8; }
.home-passing-dot { fill: var(--muted); opacity: .35; }
.home-passing-own { stroke: var(--surface); stroke-width: 1.5; }
.home-passing-home { fill: var(--matchweek-home); }
.home-passing-away { fill: var(--matchweek-away); }
.home-passing-name { fill: var(--ink); font-size: 10px; font-weight: 700; paint-order: stroke; stroke: var(--surface); stroke-width: 2.5px; stroke-linejoin: round; }

/* Sezon Ortalamasına Göre: two bars per measure out from the line that is the
   club's season average, right for more than usual, left for less. Each bar's
   half leaves 2.8em for its number at the far end. */
.home-shift-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.home-shift-zero { color: var(--muted); font-size: 10px; }
.home-shift-row { display: grid; grid-template-columns: 6.3em minmax(0, 1fr); align-items: center; column-gap: 8px; padding: 4px 0; border-top: 1px solid var(--line); }
.home-shift-label { color: var(--muted); font-size: 11px; line-height: 1.3; }
.home-shift-track { position: relative; display: grid; gap: 2px; }
.home-shift-track::before { content: ""; position: absolute; top: -2px; bottom: -2px; left: 50%; border-left: 1px solid var(--muted); }
.home-shift-bar { position: relative; height: 8px; }
.home-shift-bar i { position: absolute; top: 0; left: 50%; width: calc(var(--w) * (50% - 2.8em)); height: 100%; border-radius: 2px; }
.home-shift-home i { background: var(--matchweek-home); }
.home-shift-away i { background: var(--matchweek-away); }
.home-shift-bar b { position: absolute; top: 50%; left: calc(50% + var(--w) * (50% - 2.8em) + 4px); transform: translateY(-50%); font-size: 9px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.home-shift-down i { left: auto; right: 50%; }
.home-shift-down b { left: auto; right: calc(50% + var(--w) * (50% - 2.8em) + 4px); }

/* Dönem Dönem Hakimiyet: Maç Haftası's split bar, thicker, one per block. */
.home-phase-row { display: grid; grid-template-columns: 4.2em 2.6em minmax(0, 1fr) 2.6em; align-items: center; column-gap: 8px; padding: 4px 0; border-top: 1px solid var(--line); }
.home-phase-label { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.home-phase-row b { font-size: 12px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.home-phase-row b:last-child { text-align: right; }
.home-phase-row .home-phase-bar { grid-column: auto; height: 12px; margin-top: 0; }

/* Elevens: both sides on one full pitch (styles/pitch.css), away at the top. */
.home-lineup-caption { display: flex; align-items: center; gap: 8px; margin-top: 0; margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.home-lineup-caption + .home-pitch { margin-top: 0; }
.home-pitch + .home-lineup-caption { margin-top: 8px; margin-bottom: 0; }
.home-lineup-caption small { margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 500; }
.home-lineup-caption .club-logo { width: 22px; height: 22px; flex: 0 0 22px; }
.home-lineup-caption .club-logo img { width: 20px; height: 20px; }
/* The pitch takes whatever height the card has left once the row's height is
   set, so this card ends level with the statistics beside it. It is never
   shorter than 370px, where five lines a side of small shirts still fit. */
.home-lineups { display: flex; flex-direction: column; }
.home-pitch { display: grid; grid-template-rows: 1fr 1fr; flex: 1 1 0; min-height: 370px; padding: 8px 4px; }
.home-pitch .pitch-markings { inset: 8px; }
.home-pitch .pitch-circle { width: 24%; height: auto; aspect-ratio: 1; }
.home-pitch .pitch-box { height: 14%; }
.home-pitch-half { display: flex; flex-direction: column; justify-content: space-around; min-height: 0; }
.home-pitch-line { display: flex; justify-content: space-evenly; gap: 2px; }
.home-pitch-player { display: grid; flex: 1; justify-items: center; align-content: start; gap: 1px; min-width: 0; max-width: 64px; text-align: center; }
.home-pitch-player .pitch-shirt { width: 23px; height: auto; }
.home-pitch-player .pitch-shirt svg { width: 100%; height: auto; }
.home-pitch-player .pitch-player-name { max-width: 100%; overflow: hidden; font-size: 9px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.home-pitch-missing { margin: auto; padding: 6px 10px; border-radius: 6px; background: #0006; font-size: 11px; text-align: center; }
.home-subs { margin-top: 12px; font-size: 12px; }
.home-subs-empty { margin-bottom: 0; padding-inline-start: 1em; color: var(--muted); }
.home-subs summary { color: var(--ink); font-weight: 600; cursor: pointer; }
.home-subs h3 { margin: 10px 0 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
.home-subs ul { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.home-subs li { display: grid; grid-template-columns: 38px minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.home-subs-minute { color: var(--muted); font-variant-numeric: tabular-nums; }
.home-subs-in { color: var(--result-win); overflow-wrap: anywhere; }
.home-subs-out { color: var(--muted); overflow-wrap: anywhere; }
