/* ============================================================
   Rewa Cricket Division — plain CSS3, mobile-first
   ============================================================ */

:root {
  --brand: #0e5a3a;
  --brand-dark: #08301f;
  --brand-light: #f0f7f2;
  --accent: #c8a24a;
  --accent-dark: #a67f2e;
  --ink: #171717;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card-bg: #ffffff;
  --page-bg: #ffffff;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--page-bg);
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem;
}

main {
  flex: 1;
  padding: 2rem 0;
}

main .container {
  padding-bottom: 2rem;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px var(--brand-light);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1.05rem;
}

.brand-text {
  line-height: 1.2;
}

.brand-text strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--brand-dark);
}

.brand-text small {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Nav ---------- */
.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.main-nav a {
  color: #404040;
  font-size: 0.95rem;
  font-weight: 500;
}

.main-nav a:hover {
  color: var(--brand);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }
  .main-nav {
    display: none;
    width: 100%;
    border-top: 1px solid var(--line);
    padding-top: 0.75rem;
    margin-top: 0.25rem;
  }
  .main-nav.open {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--brand-dark) 0%, var(--brand) 60%, #0b7a4e 100%);
  color: #fff;
  text-align: center;
  padding: 4.5rem 1rem;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(200, 162, 74, 0.18), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08), transparent 45%);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.15);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 5vw, 2.9rem);
  font-weight: 900;
  max-width: 40ch;
  margin: 0.75rem auto 0;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.hero p {
  max-width: 60ch;
  margin: 1rem auto 0;
  color: #d1d5db;
}

.hero .eyebrow {
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--brand-dark);
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  text-decoration: none;
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.btn-outline {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
}

.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
}

/* ---------- Typography ---------- */
h1,
h2,
h3 {
  font-family: var(--serif);
  color: var(--brand-dark);
  line-height: 1.25;
}

h1 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 900;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.page-head {
  margin-bottom: 1.75rem;
}

/* player profile pages: centered header like a profile card */
body.profile .page-head {
  text-align: center;
}

body.profile .page-head h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

body.profile .dl-card {
  margin-left: auto;
  margin-right: auto;
}

.page-head p {
  color: var(--muted);
  margin-top: 0.35rem;
}

.section {
  margin-top: 2.5rem;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-title .link {
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.breadcrumbs li + li::before {
  content: "/";
  color: #c0c0c0;
}

.breadcrumbs [aria-current] {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Cards & grids ---------- */
.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 860px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border-color: var(--brand);
}

/* Official cards — distinct gold/amber treatment (tournaments only) */
.card-official {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(200, 162, 74, 0.10), rgba(200, 162, 74, 0.03) 45%, var(--card-bg));
  box-shadow: 0 0 0 1px rgba(200, 162, 74, 0.35), var(--shadow);
}

.card-official:hover {
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 1px rgba(200, 162, 74, 0.55), 0 6px 18px rgba(200, 162, 74, 0.15);
}

/* Official badge — small grey verified tick (players) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  vertical-align: middle;
  white-space: nowrap;
}

.badge-official {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.card-title .badge {
  margin-left: 0.3rem;
  transform: translateY(-1px);
}

/* Archive / tournaments section divider */
.archive-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 1.5rem 0;
}

.card a.card-link {
  color: var(--ink);
}

.card a.card-link:hover {
  color: var(--brand);
  text-decoration: none;
}

.card-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
}

.card-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* Team / player avatar */
.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 700;
  flex-shrink: 0;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 1.1rem;
}

.avatar-sm {
  width: 44px;
  height: 44px;
  font-size: 0.85rem;
}

.row-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

/* ---------- Match card ---------- */
.match-card .match-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.match-card .match-top .competition {
  color: var(--brand);
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: capitalize;
}

.badge-scheduled { background: #f3f4f6; color: #4b5563; }
.badge-live { background: #fee2e2; color: #b91c1c; }
.badge-completed { background: var(--brand-light); color: var(--brand-dark); }
.badge-abandoned { background: #fef3c7; color: #b45309; }
.badge-cancelled { background: #e5e7eb; color: #4b5563; }

.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.match-teams .team-name {
  flex: 1;
  text-align: center;
  font-weight: 600;
}

.match-teams .vs {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #b0b0b0;
}

.match-footer {
  border-top: 1px solid var(--line);
  margin-top: 0.75rem;
  padding-top: 0.7rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.match-footer .result {
  color: var(--brand-dark);
  font-weight: 600;
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 420px;
}

th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

th.num {
  text-align: center;
}

td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

tbody tr:nth-child(even) {
  background: #f9fbf9;
}

tbody tr:hover {
  background: var(--brand-light);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-brand img {
  border-radius: 50%;
  border: 2px solid var(--accent);
  object-fit: cover;
}

.notes-box pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.6;
  color: #374151;
  max-height: 32rem;
  overflow-y: auto;
}

tr:last-child td {
  border-bottom: none;
}

td.num {
  text-align: center;
}

td a {
  font-weight: 600;
}

/* ---------- Stats ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat {
  text-align: center;
}

.stat .stat-value {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 900;
  color: var(--brand);
}

.stat .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- Two-column ---------- */
.split {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 2fr 1fr;
  }
}

/* ---------- Empty state ---------- */
.empty {
  border: 1px dashed var(--line);
  background: #fafafa;
  border-radius: var(--radius);
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.empty .empty-icon {
  font-size: 2rem;
}

.empty h3 {
  color: var(--brand-dark);
  margin-top: 0.5rem;
}

.empty p {
  color: var(--muted);
  max-width: 46ch;
  margin: 0.5rem auto 0;
  font-size: 0.95rem;
}

/* ---------- Forms ---------- */
label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.field {
  margin-bottom: 1rem;
}

input,
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
}

input:focus,
textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}

.form-status {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--brand-dark);
}

.hidden {
  display: none;
}

/* ---------- Prose ---------- */
.prose p {
  color: #404040;
  margin-bottom: 1rem;
}

.prose h2 {
  margin: 1.75rem 0 0.75rem;
}

/* ---------- Notice ---------- */
.notice {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.92rem;
}

.notice-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.notice-warn strong {
  color: #78350f;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-dark);
  color: #e5e7eb;
  margin-top: 3rem;
}

.site-footer .container {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 700px) {
  .site-footer .container {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.site-footer h3 {
  color: #fff;
  font-family: var(--serif);
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.site-footer ul {
  list-style: none;
}

.site-footer li {
  margin-bottom: 0.35rem;
}

.site-footer a {
  color: #d1d5db;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1rem 0;
  font-size: 0.8rem;
  color: #9ca3af;
}

.footer-note {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-top: 0.6rem;
}

/* ---------- Accessibility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 50;
}

.skip-link:focus {
  left: 0;
}

/* player teams chips + tournament grouping */
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-block; padding: .35rem .8rem; border-radius: 999px; background: var(--bg-soft, rgba(0,0,0,.05)); border: 1px solid rgba(0,0,0,.08); font-size: .85rem; font-weight: 600; text-decoration: none; color: inherit; }
a.chip { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
a.chip:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
span.chip,
.chip-static,
.chip-unclickable {
  cursor: default !important;
  pointer-events: none !important;
  user-select: none;
  transform: none !important;
  box-shadow: none !important;
  opacity: 0.88;
}
.group-block { margin-bottom: 1.75rem; }
.group-title { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.group-title h3 { margin: 0; }
.count-pill { background: var(--accent, #0a7d5f); color: #fff; border-radius: 999px; padding: .15rem .65rem; font-size: .72rem; font-weight: 700; letter-spacing: .03em; }

/* scope badges (Rewa archive classification) */
.badge-state { background: #dbeafe; color: #1e40af; }
.badge-national { background: #ede9fe; color: #5b21b6; }
.badge-division { background: var(--brand-light); color: var(--brand-dark); }

/* ---------- Header search ---------- */
.header-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #f1f5f2;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.35rem 0.25rem 0.75rem;
  min-width: 250px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.header-search:focus-within {
  background: #ffffff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(16, 124, 65, 0.14);
}
.header-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
  line-height: 1;
}
.header-search-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}
.header-search input {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text);
  width: 140px;
  padding: 0.3rem 0;
  outline: none;
}
.header-search input::placeholder {
  color: var(--muted);
  opacity: 0.85;
}
.header-search input:focus {
  box-shadow: none;
}
.header-search-clear {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 0.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  transition: color 0.15s ease, background-color 0.15s ease;
  flex-shrink: 0;
}
.header-search-clear:hover {
  color: var(--text);
  background-color: rgba(0, 0, 0, 0.08);
}
.header-search-go {
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .header-search {
    order: 5;
    width: 100%;
    min-width: 0;
  }
  .header-search input {
    flex: 1;
    width: auto;
  }
}

/* ---------- Filter & Sort Bar (Players Page) ---------- */
.filter-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  align-items: flex-end;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.filter-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.filter-label svg {
  color: var(--brand);
}
.filter-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.filter-input-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  pointer-events: none;
}
.filter-input-wrap input {
  padding-left: 2.25rem !important;
}
.filter-control {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text);
  background: #f9fbf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.filter-control:focus {
  background: #ffffff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(16, 124, 65, 0.12);
}
.filter-actions {
  display: flex;
  align-items: flex-end;
}
.filter-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.player-card-item {
  transition: opacity 0.15s ease, transform 0.15s ease;
}

/* ---------- Search page ---------- */
.search-page-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.search-page-form input {
  flex: 1;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font: inherit;
}
.search-page-form input:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}
.search-count {
  color: var(--muted);
  margin-bottom: 1rem;
}
.search-results:not(.search-has-results) {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 1.25rem;
}
.search-suggest-chip {
  background: var(--bg-alt, #f8f9fa);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 999px;
  color: var(--text, #1f2937);
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.search-suggest-chip:hover {
  background: rgba(179, 27, 27, 0.08);
  border-color: var(--brand, #b31b1b);
  color: var(--brand, #b31b1b);
  transform: translateY(-1px);
}
.search-highlight {
  background: rgba(255, 230, 0, 0.45);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 700;
}

/* ---------- What's New (MP Sports) ---------- */
.whats-new .stat-grid {
  grid-template-columns: repeat(4, 1fr);
}
.press-list {
  list-style: none;
  counter-reset: press;
  margin: 0;
  padding: 0.25rem 0.9rem;
}
.press-list li {
  counter-increment: press;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  line-height: 1.5;
}
.press-list li:last-child {
  border-bottom: none;
}
.press-list li::before {
  content: counter(press) " ";
  color: var(--brand);
  font-weight: 700;
  margin-right: 0.4rem;
}
.press-date {
  display: inline-block;
  color: var(--muted);
  font-size: 0.78rem;
  background: #f0f2f0;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  margin-right: 0.4rem;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .whats-new .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.gallery-item {
  padding: 0.5rem;
  overflow: hidden;
}
.gallery-item img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}
.gallery-item:hover img {
  transform: scale(1.02);
  transition: transform 0.2s ease;
}

/* ---------- Header search: button-only (default) vs pinned (full bar) ---------- */
.header-search-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  white-space: nowrap;
  text-decoration: none;
}
.header-search-btn:hover {
  text-decoration: none;
}
@media (max-width: 900px) {
  .header-search-btn {
    order: 5;
    width: 100%;
    text-align: center;
  }
}

/* ---------- Verified tick (real SVG) ---------- */
.tick-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  padding: 0.15rem 0.3rem;
  margin-left: 0.25rem;
  border-radius: 999px;
}
.card-title .tick-svg {
  margin-left: 0.35rem;
}
h1 .tick-svg {
  margin-left: 0.4rem;
}

/* ---------- Footer about paragraph ---------- */
.footer-about {
  margin-top: 0.75rem;
  max-width: 72ch;
  line-height: 1.6;
}

/* ---------- Stat grid overflow guard ---------- */
.stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  min-width: 0;
}
.stat {
  min-width: 0;
}
.stat .stat-value {
  font-size: clamp(1.4rem, 3vw, 2rem);
  overflow-wrap: anywhere;
}

/* ---------- Minimal search icon button (no emoji, no text) ---------- */
.header-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.header-search-btn:hover {
  color: var(--brand);
  border-color: var(--brand);
  text-decoration: none;
}
.header-search-btn svg {
  display: block;
}
@media (max-width: 900px) {
  .header-search-btn {
    order: 5;
  }
}

/* pinned search: icon sits cleanly left of the input */
.header-search-icon {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  line-height: 0;
}

/* ---------- Footer legal block alignment ---------- */
.footer-legal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}
.footer-copyright {
  margin: 0;
}
.footer-about {
  max-width: 72ch;
  line-height: 1.6;
  margin: 0 auto;
}


/* ============================================================
   MOBILE RESPONSIVENESS & ZERO-OVERFLOW SAFEGUARDS
   ============================================================ */
.desktop-only {
  display: inline-flex !important;
}
.mobile-only-nav-item {
  display: none !important;
}

.grid > * {
  min-width: 0;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
}

.card.table-wrap {
  padding: 0 !important;
}

.header-ctrl-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-search-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem !important;
  border-radius: 999px !important;
  font-size: 0.825rem !important;
  font-weight: 600 !important;
  border: 1px solid var(--line) !important;
  background: var(--brand-light) !important;
  color: var(--brand-dark) !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  width: auto !important;
  height: auto !important;
  transition: all 0.2s ease;
}
.header-search-btn:hover {
  background: var(--brand) !important;
  color: #fff !important;
}

@media (max-width: 900px) {
  .site-header .container {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    flex-wrap: wrap;
  }
  .desktop-only {
    display: none !important;
  }
  .mobile-only-nav-item {
    display: block !important;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line);
  }
  .mobile-rdca-link {
    font-weight: 700 !important;
    color: var(--brand) !important;
  }
  .brand {
    min-width: 0;
    flex: 1;
    gap: 0.6rem;
  }
  .brand-logo {
    width: 38px;
    height: 38px;
  }
  .brand-text strong {
    font-size: 0.95rem;
    line-height: 1.15;
    word-break: break-word;
  }
  .brand-text small {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
  }
  .nav-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    flex-shrink: 0;
  }
  .main-nav {
    display: none;
    width: 100%;
    border-top: 1px solid var(--line);
    padding-top: 0.75rem;
    margin-top: 0.25rem;
  }
  .main-nav.open {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 0.25rem;
  }
  .main-nav a {
    display: block;
    padding: 0.5rem 0.5rem;
    font-size: 0.95rem;
    border-radius: 6px;
  }
  .main-nav a:hover,
  .main-nav a.active {
    background: var(--brand-light);
    color: var(--brand-dark);
  }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr !important;
  }
  .hero {
    padding: 3rem 1rem 2.5rem;
  }
  .hero h1 {
    font-size: clamp(1.6rem, 5.5vw, 2.2rem);
    line-height: 1.15;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin: 1.5rem auto 0;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .site-footer .container {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.85rem;
  }
  .brand-text strong {
    font-size: 0.85rem;
    line-height: 1.15;
  }
  .brand-logo {
    width: 34px;
    height: 34px;
  }
  .nav-toggle {
    width: 36px;
    height: 36px;
  }
}
