/* Rostermania — matches the original Tailwind v4 build value-for-value */
:root {
  --background: #0a0a0a;
  --foreground: #ededed;

  --slate-100: oklch(0.968 0.007 247.896);
  --slate-200: oklch(0.929 0.013 255.508);
  --slate-300: oklch(0.869 0.022 252.894);
  --slate-400: oklch(0.704 0.04 256.788);
  --slate-600: oklch(0.446 0.043 257.281);
  --slate-700: oklch(0.372 0.044 257.287);
  --slate-800: oklch(0.279 0.041 260.031);
  --slate-900: oklch(0.208 0.042 265.755);
  --gray-400: oklch(0.707 0.022 261.325);
  --indigo-500: oklch(0.585 0.233 277.117);

  /* row backgrounds */
  --row-stay-confirmed: oklch(0.448 0.119 151.328 / 0.7);  /* green-800/70 */
  --row-stay-rumored: oklch(0.792 0.209 151.711 / 0.5);    /* green-400/50 */
  --row-stay-contract: oklch(0.372 0.044 257.287 / 0.6);   /* slate-700/60 */
  --row-stay-unknown: oklch(0.446 0.043 257.281 / 0.6);    /* slate-600/60 */
  --row-leave-confirmed: oklch(0.505 0.213 27.518 / 0.7);  /* red-700/70 */
  --row-leave-rumored: oklch(0.646 0.222 41.116 / 0.6);    /* orange-600/60 */
  --row-open: oklch(0.795 0.184 86.047 / 0.6);             /* yellow-500/60 */
  --row-join-confirmed: oklch(0.488 0.243 264.376 / 0.7);  /* blue-700/70 */
  --row-join-rumored: oklch(0.588 0.158 241.966 / 0.6);    /* sky-600/60 */
  --row-other: oklch(0.208 0.042 265.755 / 0.8);           /* slate-900/80 */

  /* badges */
  --badge-green-bg: oklch(0.266 0.065 152.934);  --badge-green-fg: oklch(0.962 0.044 156.743);
  --badge-emerald-bg: oklch(0.378 0.077 168.94); --badge-emerald-fg: oklch(0.95 0.052 163.051);
  --badge-blue-bg: oklch(0.282 0.091 267.935);   --badge-blue-fg: oklch(0.932 0.032 255.585);
  --badge-sky-bg: oklch(0.391 0.09 240.876);     --badge-sky-fg: oklch(0.951 0.026 236.824);
  --badge-red-bg: oklch(0.258 0.092 26.042);     --badge-red-fg: oklch(0.936 0.032 17.717);
  --badge-orange-bg: oklch(0.408 0.123 38.172);  --badge-orange-fg: oklch(0.954 0.038 75.164);
  --badge-yellow-bg: oklch(0.421 0.095 57.708);  --badge-yellow-fg: oklch(0.973 0.071 103.193);
  --badge-slate-bg: oklch(0.208 0.042 265.755);  --badge-slate-fg: oklch(0.968 0.007 247.896);
}

*, ::before, ::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid; }
html { -webkit-text-size-adjust: 100%; line-height: 1.5; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p { font-size: inherit; font-weight: inherit; }
ul { list-style: none; }
img, svg { display: block; vertical-align: middle; }
img { max-width: 100%; }
a { color: inherit; text-decoration: inherit; }
button, input { font: inherit; color: inherit; background: transparent; }
sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; top: -0.5em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }

/* ---------- layout ---------- */
.container { margin-inline: auto; max-width: 80rem; padding: 0 1rem 4rem; }
.container > :not(:last-child) { margin-bottom: 2.5rem; }
.top { padding-top: 1.5rem; }
.top > :not(:last-child) { margin-bottom: 2.5rem; }
.heading > :not(:last-child) { margin-bottom: 0.5rem; }
h1 { text-align: center; font-size: 1.875rem; line-height: 2.25rem; font-weight: 700; color: var(--slate-100); }
.updated { text-align: center; font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; color: var(--slate-400); }

.stack > :not(:last-child) { margin-bottom: 0.5rem; }

/* ---------- recent moves ---------- */
.feed-head { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.feed-head h2 { font-weight: 600; text-transform: uppercase; letter-spacing: 0.025em; color: var(--slate-100); flex: none; }
.day-strip {
  display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; min-width: 0;
  max-width: min(100%, 44rem); padding: 2px; margin: -2px; /* room for the focus ring */
}
/* fade only the edge that has more chips behind it */
.day-strip.more-right { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 2rem), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 2rem), transparent); }
.day-strip.more-left { -webkit-mask-image: linear-gradient(90deg, transparent, #000 2rem); mask-image: linear-gradient(90deg, transparent, #000 2rem); }
.day-strip.more-left.more-right { -webkit-mask-image: linear-gradient(90deg, transparent, #000 2rem, #000 calc(100% - 2rem), transparent); mask-image: linear-gradient(90deg, transparent, #000 2rem, #000 calc(100% - 2rem), transparent); }
.day-strip::-webkit-scrollbar { display: none; }
.day-chip {
  flex: none; display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer;
  padding: 0.375rem 0.75rem; border-radius: 0.5rem; border: 1px solid var(--slate-800);
  background: oklch(0.208 0.042 265.755 / 0.6); color: var(--slate-300);
  font-size: 0.8125rem; line-height: 1.25rem; font-weight: 600; white-space: nowrap;
  transition: color .15s cubic-bezier(.4,0,.2,1), background-color .15s cubic-bezier(.4,0,.2,1), border-color .15s cubic-bezier(.4,0,.2,1);
  -webkit-tap-highlight-color: transparent;
}
.day-chip:hover { background: var(--slate-800); color: #fff; }
.day-chip[aria-selected="true"] { background: var(--indigo-500); border-color: var(--indigo-500); color: #fff; }
.day-chip:focus-visible { outline: 2px solid var(--indigo-500); outline-offset: 2px; }
.day-count {
  min-width: 1.25rem; padding: 0 0.375rem; border-radius: 0.25rem; text-align: center;
  font-size: 0.6875rem; line-height: 1.125rem; background: rgb(255 255 255 / 0.08); color: var(--slate-300);
}
.day-chip[aria-selected="true"] .day-count { background: rgb(255 255 255 / 0.2); color: #fff; }

/* teams flow into balanced columns, so a 40-move day stays a few rows tall */
.feed-cols { column-width: 16rem; column-gap: 1.5rem; }
.feed-team { break-inside: avoid; padding-bottom: 1.25rem; }
.feed-team-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.feed-team-head .logo, .feed-team-head .initials { height: 1.5rem; width: 1.5rem; flex: none; object-fit: contain; font-size: 0.625rem; }
.feed-team-head h3 { font-size: 0.875rem; font-weight: 600; color: var(--slate-200); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-more {
  display: block; margin: 0 auto; padding: 0.375rem 1rem; border-radius: 0.5rem; cursor: pointer;
  border: 1px solid var(--slate-800); color: var(--slate-300); font-size: 0.875rem; font-weight: 600;
  transition: color .15s, background-color .15s;
}
.feed-more:hover { background: var(--slate-800); color: #fff; }
.feed-more:focus-visible { outline: 2px solid var(--indigo-500); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .day-chip, .feed-more { transition: none; } }

.rule { height: 1px; width: 100%; background: var(--slate-800); }

.controls { position: relative; margin-top: 2rem; display: flex; width: 100%; flex-direction: column; align-items: center; gap: 0.75rem; }
.seg { display: inline-flex; overflow: hidden; border-radius: 0.5rem; border: 1px solid var(--slate-800); background: oklch(0.208 0.042 265.755 / 0.6); }
.seg button, .toggle {
  padding: 0.5rem 1rem; font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; cursor: pointer;
  color: var(--slate-300);
  transition: color .15s cubic-bezier(.4,0,.2,1), background-color .15s cubic-bezier(.4,0,.2,1), border-color .15s cubic-bezier(.4,0,.2,1);
}
.seg button + button { border-left: 1px solid var(--slate-800); }
.seg button:first-child { border-top-left-radius: 0.5rem; border-bottom-left-radius: 0.5rem; }
.seg button:last-child { border-top-right-radius: 0.5rem; border-bottom-right-radius: 0.5rem; }
.seg button:hover, .toggle:hover { background: var(--slate-800); color: #fff; }
.seg button[aria-checked="true"], .toggle.on { background: var(--indigo-500); color: #fff; box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); }
.toggle { display: inline-flex; align-items: center; gap: 0.5rem; border-radius: 0.5rem; border: 1px solid var(--slate-800); }

.regions > :not(:last-child) { margin-bottom: 2.5rem; }
.region > :not(:last-child) { margin-bottom: 1rem; }
.region-head { display: flex; align-items: center; gap: 0.75rem; }
.region-head img { height: 2.5rem; width: 2.5rem; }
.region-head h2 { font-size: 1.5rem; line-height: 2rem; font-weight: 600; color: var(--slate-100); }
.teams { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 1.5rem; }

.np-block { padding-top: 2.5rem; border-top: 1px solid var(--slate-800); }
.np-block > :not(:last-child) { margin-bottom: 2rem; }
.np-head { text-align: center; }
.np-head h2 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 700; color: var(--slate-100); }
.np-head p { margin-top: 0.25rem; font-size: 0.875rem; font-weight: 500; color: var(--slate-400); }
.region-sub .region-head img { height: 2rem; width: 2rem; }
.region-sub .region-head h3 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; color: var(--slate-100); }

.card {
  display: flex; height: 100%; flex-direction: column; border-radius: 0.75rem;
  border: 1px solid rgb(255 255 255 / 0.1); background: oklch(0.208 0.042 265.755 / 0.6);
  padding: 0.75rem; box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  /* no backdrop-filter: over the solid page background it had no visible effect but made every repaint expensive */
}

/* ---------- motion ---------- */
html { overflow-anchor: none; } /* app.js keeps the scroll position itself */
@keyframes rm-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rm-row-enter { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.fade-in { animation: rm-fade-in 220ms cubic-bezier(.2,.7,.3,1) both; }
.row-enter { animation: rm-row-enter 200ms ease-out both; }
.seg button, .toggle { -webkit-tap-highlight-color: transparent; }
.seg button:focus-visible, .toggle:has(input:focus-visible) { outline: 2px solid var(--indigo-500); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .fade-in, .row-enter { animation: none; }
  .seg button, .toggle { transition: none; }
}
.card-head { display: flex; align-items: flex-start; gap: 1rem; }
.card-title { display: flex; flex: 1 1 0%; align-items: center; gap: 0.75rem; }
.card-logo { display: flex; height: 2.5rem; width: 2.5rem; align-items: center; justify-content: center; }
.card-logo img { height: 2.5rem; width: 2.5rem; object-fit: contain; }
.card h3 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; color: var(--slate-100); }
.card ul { margin-top: 1rem; }

.initials {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  font-size: 0.875rem; line-height: 1; font-weight: 600; text-transform: uppercase; color: var(--slate-300);
  border-radius: 0.375rem; background: rgb(255 255 255 / 0.06);
}

.sep { padding: 0 0.75rem; }
.sep > div {
  pointer-events: none; margin: 0.75rem 0; height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.32) 50%, rgba(255,255,255,0) 100%);
  box-shadow: 0 1px 0 rgba(15,23,42,0.6), 0 -1px 0 rgba(255,255,255,0.45);
}

/* ---------- roster row ---------- */
.row { display: flex; align-items: center; border-radius: 0.5rem; padding: 0.5rem 0.75rem; font-size: 0.875rem; line-height: 1.25rem; color: var(--slate-100); }
.row-main { display: flex; flex: 1 1 0%; align-items: center; gap: 0.5rem; }
.sign { font-weight: 600; line-height: 1; font-size: 1rem; }
.sign.big { font-size: 1.25rem; }
.sign.hidden { opacity: 0; }
.flag { cursor: default; font-size: 1rem; line-height: 1; }
.name-wrap { display: flex; align-items: center; gap: 0.5rem; }
.name { font-weight: 500; letter-spacing: 0.025em; }
.name-img { height: 1.5rem; width: 1.5rem; object-fit: contain; }
.role { vertical-align: super; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.025em; color: var(--slate-200); }
.badge {
  margin-left: 0.75rem; display: inline-flex; align-items: center; gap: 0.25rem; border-radius: 0.25rem;
  padding: 4px 0.375rem; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.025em; line-height: 1;
}
.badge svg { height: 0.75rem; width: 0.75rem; }

.bg-stay-confirmed { background: var(--row-stay-confirmed); }
.bg-stay-rumored { background: var(--row-stay-rumored); }
.bg-stay-contract { background: var(--row-stay-contract); }
.bg-stay-unknown { background: var(--row-stay-unknown); }
.bg-leave-confirmed { background: var(--row-leave-confirmed); }
.bg-leave-rumored { background: var(--row-leave-rumored); }
.bg-open { background: var(--row-open); }
.bg-join-confirmed { background: var(--row-join-confirmed); }
.bg-join-rumored { background: var(--row-join-rumored); }
.bg-other { background: var(--row-other); }

.b-green { background: var(--badge-green-bg); color: var(--badge-green-fg); }
.b-emerald { background: var(--badge-emerald-bg); color: var(--badge-emerald-fg); }
.b-blue { background: var(--badge-blue-bg); color: var(--badge-blue-fg); }
.b-sky { background: var(--badge-sky-bg); color: var(--badge-sky-fg); }
.b-red { background: var(--badge-red-bg); color: var(--badge-red-fg); }
.b-orange { background: var(--badge-orange-bg); color: var(--badge-orange-fg); }
.b-yellow { background: var(--badge-yellow-bg); color: var(--badge-yellow-fg); }
.b-slate { background: var(--badge-slate-bg); color: var(--badge-slate-fg); }

.site-footer { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; justify-content: center; padding: 1rem; }
.site-footer p { font-size: 0.75rem; line-height: 1rem; color: var(--gray-400); text-align: center; }
.site-footer a { text-decoration: underline; }

/* ---------- breakpoints (sm 40rem, lg 64rem, xl 80rem) ---------- */
@media (width >= 40rem) {
  .container { padding-inline: 1.5rem; }
  .controls { flex-direction: row; justify-content: center; gap: 0; }
  .toggle { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
  .teams { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feed-head { flex-direction: row; justify-content: center; gap: 1rem; }
}
@media (width >= 64rem) {
  .container { padding-inline: 2rem; }
  .teams { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (width >= 80rem) {
  .teams { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
