/* Version 20: matchday colour and contrast, using the existing page and XI components. */
:root {
  --navy: #0e2544;
  --ink: #172e4c;
  --blue: #245cc5;
  --muted: #52647b;
  --wash: #f0f5fc;
  --line: #d5dfed;
}

.site-header { border-bottom: 2px solid var(--navy); }
.nav-link { font-weight: 750; }
.nav-link.active:after { height: 3px; background: var(--blue); }
.brand-name strong { font-weight: 700; }
.button { border-radius: 5px; font-weight: 750; transition: background-color .16s, border-color .16s; }
.button-navy { background: var(--blue); }
.button-navy:hover { background: #16479f; }
.button-outline { border-color: #899db8; }
.page-intro h1, .section-heading h2, .voice-intro h2 { font-weight: 700; }
.page-intro .eyebrow, .section-heading .eyebrow { color: var(--blue); }

/* Design Mission 18: one title, solid navy and the existing next-match action. */
.brand-home-label { display: none; }
body:has([data-page="home"]:not([hidden])) .site-header .brand-name { display: none; }
body:has([data-page="home"]:not([hidden])) .site-header .brand-home-label { display: inline; }
.home-hero {
  position: relative;
  isolation: isolate;
  grid-template-areas: "copy context";
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  padding-block: 36px;
  gap: 40px;
  color: #fff;
}
.home-hero:before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--navy);
  box-shadow: 0 0 0 100vmax var(--navy);
  clip-path: inset(0 -100vmax);
}
.home-hero .hero-copy { min-width: 0; }
.home-hero .hero-copy h1 {
  font-weight: 700;
  font-size: clamp(3rem, 5.5vw, 5.1rem);
  line-height: 1.02;
  letter-spacing: -.055em;
  color: #fff;
  margin-bottom: 12px;
}
.home-hero .hero-copy h1 em { color: #a8ccff; }
.home-hero .hero-description { color: #d4e1f3; font-size: 1.125rem; line-height: 1.5; margin: 0; }
.home-hero .hero-actions { margin-top: 14px; }
.home-hero .hero-actions a { color: #fff; text-decoration-color: #7799c6; }
.home-hero .hero-actions a:hover { color: #b9d5ff; }
.home-hero #home-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: normal;
  grid-area: context;
  grid-column: auto;
  align-self: center;
  min-width: 0;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid #4977b7;
  border-left: 3px solid #a8ccff;
  border-radius: 5px;
  background: #1a4380;
}
#home-context .eyebrow { color: #cbdfff; font-size: .75rem; line-height: 1.3; letter-spacing: .12em; margin: 0; min-width: 0; }
#home-context h2 { color: #fff; font-weight: 700; font-size: clamp(1.5rem, 2.2vw, 1.9rem); line-height: 1.2; margin: 0; }
#home-context p { color: #e4edfb; font-size: .9375rem; line-height: 1.5; margin: 0; min-width: 0; overflow-wrap: anywhere; }
#home-context .button-navy { background: #fff; color: var(--navy); border-color: #fff; min-height: 48px; justify-self: start; margin-top: 4px; }
#home-context .button-navy:hover { background: #dceaff; border-color: #dceaff; }
#home-context .text-link { color: #fff; }

.editorial-intro .photo-awaiting.photo-graphic { background: var(--navy); border-bottom-color: var(--blue); }
.editorial-intro .photo-awaiting.photo-graphic > span,
.editorial-intro .photo-awaiting.photo-graphic > p { color: #fff; }

.home-conversations { padding-top: 48px; }
.home-posts { border-top: 3px solid var(--navy); }
.home-posts h3 { font-weight: 700; }
.home-posts h3 button:hover { color: var(--blue); }
.home-listen { background: var(--blue); color: #fff; border-radius: 5px; }
.home-listen:hover { background: #184bA5; color: #fff; }
.home-listen p, .home-listen .eyebrow { color: #e0ebff; }
.home-listen .text-link { color: #fff; }

/* The same pitch still serves every XI mode, with clearer player cards. */
.xi-heading h1 { font-weight: 700; letter-spacing: -.045em; }
.xi-section { padding-top: 32px; }
.xi-match-heading { padding-left: 16px; border-left: 4px solid var(--blue); }
.xi-match-heading h3 { font-size: clamp(1.25rem, 2.7vw, 1.65rem); }
.xi-view-tabs { gap: 4px; border-bottom: 0; padding: 4px; background: #edf2fa; border-radius: 6px; }
.xi-view-tabs button { border-bottom: 0; border-radius: 4px; color: #435772; }
.xi-view-tabs button[aria-pressed=true] { color: #fff; background: var(--navy); }
.xi-formation-bar { margin-block: 18px; }
.xi-formation-bar select { font-weight: 750; border-color: #a8bad4; }
.xi-formation-bar [data-xi-filled] { color: var(--navy); font-weight: 700; }
.xi-pitch {
  background: repeating-linear-gradient(0deg, #195e48 0%, #195e48 10%, #216950 10%, #216950 20%);
  border: 8px solid #124a39;
  border-radius: 9px;
  box-shadow: 0 8px 22px #0e254412;
}
.xi-pitch > svg { stroke: #d5eadc; stroke-opacity: .52; stroke-width: .4; }
.xi-position { gap: 2px; transition: transform .15s; }
.xi-card-compact { display: none; }
.xi-position strong {
  background: #fff;
  color: var(--navy);
  border: 1px solid #e1e9f0;
  border-radius: 4px;
  font-size: .8125rem;
  font-weight: 750;
  padding: 2px 4px;
  box-shadow: 0 2px 5px #0b2a2633;
}
.xi-position small { background: #103c2fd9; color: #fff; font-size: .625rem; }
.xi-shirt {
  width: 36px;
  height: 36px;
  font-size: .6rem;
  color: var(--navy);
  background: linear-gradient(0deg, #fff 0 60%, #dceaff 60% 72%, #fff 72%);
}
.xi-position:not(.filled) .xi-shirt {
  clip-path: none;
  width: 34px;
  height: 34px;
  border: 1px dashed #d6e9df;
  border-radius: 50%;
  color: #fff;
  background: #ffffff12;
  font-size: 1.2rem;
}
.xi-position.is-active strong, button.xi-position:hover strong { background: var(--blue); border-color: #83b5ff; color: #fff; }
button.xi-position:hover { transform: translate(-50%, -50%) scale(1.035); }
.xi-pitch button:focus-visible { outline: 3px solid #fff; outline-offset: 4px; border-radius: 4px; }
.xi-position.correct .xi-shirt { background: #b9ecc9; color: #17432c; }
.xi-position.incorrect .xi-shirt { background: #f6c4ca; color: #731d2a; }
.xi-position.position-mismatch .xi-shirt { background: #ffe0a8; color: #663c0a; }
.xi-position.pending .xi-shirt { background: #cbddff; color: #18395f; }
.xi-picker { border-top: 3px solid var(--blue); padding-top: 18px; }
.xi-picker-options button { border-radius: 5px; min-height: 52px; }
.xi-picker-options button:hover, .xi-picker-options button[aria-pressed=true] { border-color: var(--blue); background: #eaf1ff; }
.xi-save-status { padding: 13px 16px; background: var(--wash); border-left: 3px solid var(--blue); border-radius: 3px; }
.xi-actions .button { min-height: 50px; }
.fanliga-xi-entry { padding: 26px; background: var(--navy); color: #fff; border: 0; border-radius: 6px; }
.fanliga-xi-entry h2 { color: #fff; font-size: 1.7rem; font-weight: 700; }
.fanliga-xi-entry p { color: #d5e3f7; }
.fanliga-xi-entry .button { color: var(--navy); background: #fff; }
.fanliga-xi-entry .button:hover { background: #dceaff; }

.footer { background: var(--navy); color: #fff; border-top: 5px solid var(--blue); }
.footer .brand-sign, .footer .brand-name { color: #fff; }
.footer .brand-sign span, .footer .brand-name strong { color: #a8ccff; }
.footer .footer-links a, .footer .footer-links button { color: #e0eaff; }
.footer .footer-motto { color: #a8ccff; }
.footer-bottom { border-color: #ffffff26; }
.footer-bottom p, .footer-bottom button { color: #d4e0f0; }

@media (max-width: 1100px) {
  .home-hero { gap: 24px 32px; }
}
@media (max-width: 980px) {
  .xi-builder-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .xi-section { padding-top: 24px; }
  .xi-heading h1 { font-size: 2rem; }
  .xi-view-tabs button { font-size: .8125rem; }
  .xi-match-heading { padding-left: 12px; }
  .xi-pitch { border-width: 5px; aspect-ratio: 100 / 140; min-height: 520px; }
  .xi-shirt { width: 24px; height: 24px; font-size: .55rem; }
  .xi-position:not(.filled) .xi-shirt { width: 29px; height: 29px; }
  .xi-position { gap: 1px; }
  .xi-position strong { font-size: .75rem; line-height: 1.1; letter-spacing: -.02em; padding: 1px 2px; }
  .xi-position small { font-size: .5625rem; line-height: 1.1; padding: 0 2px; }
  .xi-card-full { display: none; }
  .xi-card-compact { display: inline; }
  .xi-picker-options small { font-size: .8125rem; }
  .fanliga-xi-entry { padding: 24px 20px; }
}
@media (max-width: 700px) {
  .home-hero { grid-template-areas: "copy" "context"; grid-template-columns: 1fr; padding-block: 28px; gap: 24px; }
}
@media (max-width: 600px) {
  .home-hero { padding-block: 24px; gap: 18px; }
  .home-hero .hero-copy h1 { font-size: clamp(2.16rem, 8.8vw, 3.04rem); line-height: 1.05; margin-bottom: 10px; }
  .home-hero .hero-description { font-size: 1rem; }
  .home-hero .hero-actions { margin-top: 12px; }
  .home-hero #home-context { padding: 16px; }
  #home-context h2 { font-size: 1.5rem; }
  #home-context p { font-size: .875rem; line-height: 1.55; }
  #home-context .button-navy { width: 100%; justify-self: stretch; }
  .home-conversations { padding-top: 34px; }
  .home-listen { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .button, .xi-position { transition: none; }
  button.xi-position:hover { transform: translate(-50%, -50%); }
}
