/*
Theme Name: The Arsenal Review Data
Description: Data-first block theme for The Arsenal Review — results, fixtures, players, managers and the article archive.
Version: 1.0.1
Requires at least: 6.5
Text Domain: tar-data
*/

:root {
  --red: #c8102e; --red-dark: #9e0c24; --ink: #14181f; --navy: #0d1726; --navy-2: #16233a; --gold: #b8913a;
  --paper: #f5f4f0; --white: #fff; --line: #e3e1da; --muted: #5d646e; --win: #1f8a4c; --draw: #8a8f98; --loss: #c8102e;
  --radius: 10px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--red); text-underline-offset: 2px; }
a:hover { color: var(--red-dark); }
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* ---------- header ---------- */
.tar-header { background: var(--navy); color: #fff; border-bottom: 4px solid var(--red); }
.tar-bar { max-width: 1200px; margin: 0 auto; padding: 18px 16px 10px; display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.tar-logo { font-family: var(--head); font-weight: 700; font-size: 30px; letter-spacing: .5px; text-transform: uppercase; color: #fff; text-decoration: none; line-height: 1; }
.tar-logo span { color: #c9ced8; font-weight: 600; }
.tar-logo:hover { color: #fff; }
.tar-tag { color: #9aa4b5; font-size: 13px; letter-spacing: .4px; text-transform: uppercase; }
.tar-nav { max-width: 1200px; margin: 0 auto; padding: 0 8px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tar-nav::-webkit-scrollbar { display: none; }
.tar-nav a { color: #dfe3ea; text-decoration: none; font-family: var(--head); font-size: 17px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; padding: 10px 10px 12px; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -4px; }
.tar-nav a:hover { color: #fff; border-bottom-color: var(--gold); }

/* ---------- layout ---------- */
.tar-main { max-width: 1200px; margin: 0 auto; padding: 22px 16px 56px; }
.tar-main.tar-prose { max-width: 800px; }
.tar-page h2, .tar-main h2 { font-size: 28px; margin: 36px 0 12px; text-transform: uppercase; letter-spacing: .3px; }
.tar-page h3 { font-size: 22px; margin: 26px 0 10px; }
.tar-h1, h1.tar-h1 { font-family: var(--head); font-size: clamp(34px, 6vw, 52px); font-weight: 700; line-height: 1.05; margin: 6px 0 14px; text-transform: uppercase; letter-spacing: .2px; }
.tar-lede { font-size: 18px; line-height: 1.55; color: #2b313b; max-width: 820px; margin: 0 0 18px; }
.tar-kicker { margin: 0 0 4px; color: var(--muted); font-size: 14px; text-transform: uppercase; letter-spacing: .5px; }
.tar-muted, .tar-muted a { color: var(--muted); font-size: 14px; }
.tar-crumbs { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.tar-crumbs a { color: var(--muted); text-decoration: none; }
.tar-crumbs a:hover { color: var(--red); }
.tar-crumbs span { margin: 0 4px; }
.tar-src { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 36px; }
.tar-src + .tar-src { border: 0; margin-top: 4px; padding-top: 0; }
.tar-src a { color: var(--muted); }
.tar-pager { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 600; margin-top: 28px; }
.tar-pager a { text-decoration: none; }
.tar-callout { background: #fff; border-left: 4px solid var(--gold); padding: 12px 16px; border-radius: 6px; box-shadow: var(--shadow); }
.tar-notes { padding-left: 20px; }
.tar-notes li { margin: 6px 0; }

/* ---------- tiles / cards / hubs ---------- */
.tar-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 18px 0; }
.tar-tile { background: #fff; border-radius: var(--radius); padding: 14px 14px 12px; box-shadow: var(--shadow); border-top: 3px solid var(--red); }
.tar-tile b { display: block; font-family: var(--head); font-size: 32px; line-height: 1; color: var(--ink); }
.tar-tile span { display: block; margin-top: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.tar-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 20px 0 8px; }
.tar-card { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.tar-card h2 { font-size: 15px !important; margin: 0 0 8px !important; color: var(--muted); letter-spacing: .8px !important; }
.tar-card p { margin: 4px 0; }
.tar-card .tar-vs { font-family: var(--head); font-size: 26px; font-weight: 700; line-height: 1.15; }
.tar-next { background: var(--navy); color: #fff; }
.tar-next h2, .tar-next .tar-muted { color: #9aa4b5 !important; }
.tar-next .tar-more { color: #fff; }
.tar-more { display: inline-block; margin-top: 10px; font-weight: 700; text-decoration: none; font-size: 14px; }
.tar-hubs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.tar-hub { display: block; background: #fff; border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border-left: 4px solid var(--red); transition: transform .12s; }
.tar-hub:hover { transform: translateY(-2px); color: var(--ink); }
.tar-hub b { display: block; font-family: var(--head); font-size: 22px; text-transform: uppercase; }
.tar-hub span { font-size: 13px; color: var(--muted); }

/* ---------- facts ---------- */
.tar-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin: 18px 0; max-width: 640px; }
.tar-facts dt { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .4px; padding-top: 2px; }
.tar-facts dd { margin: 0; font-weight: 600; }

/* ---------- tables ---------- */
.tar-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 10px 0 8px; border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
.tar-table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: #fff; }
.tar-table th { background: var(--navy); color: #fff; text-align: left; font-family: var(--head); font-weight: 600; font-size: 15px; letter-spacing: .4px; text-transform: uppercase; padding: 9px 10px; white-space: nowrap; }
.tar-table td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.tar-table tbody tr:nth-child(even) td { background: #faf9f6; }
.tar-table tbody tr:hover td { background: #fff6e6; }
.tar-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tar-table tr.tar-us td { background: #fdecef !important; font-weight: 700; }
.tar-table a { text-decoration: none; font-weight: 600; }
.tar-table a:hover { text-decoration: underline; }
.tar-table small { color: var(--muted); font-weight: 400; }
.tar-compact { width: auto; min-width: 50%; }
.tar-seasons td, .tar-players td { white-space: nowrap; }
.tar-res { display: inline-block; min-width: 24px; text-align: center; border-radius: 4px; color: #fff; font-weight: 700; font-size: 12px; padding: 2px 6px; }
.tar-res-w { background: var(--win); } .tar-res-d { background: var(--draw); } .tar-res-l { background: var(--loss); }
.tar-honours { columns: 4 140px; padding-left: 20px; }
.tar-arts { list-style: none; padding: 0; }
.tar-arts li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.tar-arts span { color: var(--muted); font-size: 13px; margin-left: 6px; white-space: nowrap; }

/* ---------- article cards ---------- */
.tar-section { font-size: 28px; text-transform: uppercase; margin-top: 44px !important; }
.tar-postgrid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; padding: 0; list-style: none; }
.tar-post { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); height: 100%; display: flex; flex-direction: column; gap: 0 !important; }
.tar-post .wp-block-post-featured-image { margin: 0; background: linear-gradient(135deg, var(--navy), var(--navy-2)); aspect-ratio: 16/9; }
.tar-post .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; }
.tar-post .wp-block-post-title { font-size: 21px; margin: 6px 16px 8px; line-height: 1.2; }
.tar-post .wp-block-post-title a { color: var(--ink); text-decoration: none; }
.tar-post .wp-block-post-title a:hover { color: var(--red); }
.tar-cat { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.tar-post .tar-cat { margin: 12px 16px 0; }
.tar-cat a { text-decoration: none; color: var(--red); }
.tar-meta { gap: 10px; font-size: 13px; color: var(--muted); }
.tar-post .tar-meta { margin: auto 16px 14px; }
.tar-meta > * + *::before { content: "·"; margin-right: 10px; }
.tar-meta a { color: var(--muted); text-decoration: none; }
.tar-more-wrap { margin-top: 18px; }
.wp-block-query-pagination { margin-top: 28px; gap: 8px; font-weight: 600; }
.wp-block-query-pagination a, .wp-block-query-pagination .current { padding: 4px 10px; border-radius: 6px; text-decoration: none; }
.wp-block-query-pagination .current { background: var(--red); color: #fff; }

/* ---------- single article ---------- */
.tar-byline { margin: 0 0 18px; }
.tar-prose .wp-block-post-featured-image { margin: 0 0 22px; border-radius: var(--radius); overflow: hidden; }
.tar-prose .wp-block-post-featured-image img { width: 100%; object-fit: cover; }
.tar-article { font-size: 18px; line-height: 1.7; }
.tar-article p { margin: 0 0 1.1em; }
.tar-article h2, .tar-article h3 { margin: 1.6em 0 .5em; }
.tar-article blockquote { border-left: 4px solid var(--gold); margin: 1.4em 0; padding: 4px 18px; color: #333; font-style: italic; }
.tar-article img { border-radius: 8px; }
.tar-explore { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 18px 20px; margin: 36px 0 18px; }
.tar-explore h2 { color: #fff; margin: 0 0 6px !important; font-size: 22px !important; }
.tar-explore a { color: #fff; font-weight: 600; }
.tar-postnav { margin-top: 18px; font-weight: 600; }
.tar-postnav a { text-decoration: none; }

/* ---------- footer ---------- */
.tar-footer { background: var(--navy); color: #c9ced8; padding: 36px 16px 28px; border-top: 4px solid var(--red); }
.tar-fcols { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.tar-fcols h4 { font-family: var(--head); text-transform: uppercase; color: #fff; font-size: 18px; margin: 0 0 10px; letter-spacing: .5px; }
.tar-fcols a { display: block; color: #c9ced8; text-decoration: none; padding: 3px 0; font-size: 14px; }
.tar-fcols a:hover { color: #fff; }
.tar-legal { max-width: 1200px; margin: 26px auto 0; font-size: 12.5px; color: #8b95a7; border-top: 1px solid #22314b; padding-top: 16px; }
.tar-legal a { color: #b5bdca; }

@media (max-width: 640px) {
  .tar-bar { padding-top: 14px; }
  .tar-logo { font-size: 24px; }
  .tar-tag { display: none; }
  .tar-lede { font-size: 16.5px; }
  .tar-table { font-size: 13.5px; }
  .tar-table td, .tar-table th { padding: 7px 8px; }
  .tar-compact { width: 100%; }
  .tar-facts { grid-template-columns: 1fr; gap: 2px; }
  .tar-facts dd { margin-bottom: 8px; }
  .tar-article { font-size: 17px; }
}

/* fit narrow tables to their box; keep dates on one line */
.tar-scroll:has(> .tar-compact) { width: fit-content; max-width: 100%; }
.tar-compact { min-width: 0; }
.tar-table td:first-child { white-space: nowrap; }
@media (max-width: 640px) { .tar-scroll:has(> .tar-compact) { width: auto; } }
