/* sport-data.site — magazine template. Change only this :root block to restyle. */
:root {
  --primary: #be123c;
  --accent: #0ea5e9;
  --bg: #ffffff;
  --surface: #f9f9fa;
  --surface-2: #f2f3f4;
  --text: #0f172a;
  --muted: #636874;
  --border: #e3e4e6;
  --link: #be123c;
  --font-head: "Oswald", system-ui, sans-serif;
  --font-body: "Roboto", system-ui, sans-serif;
  --radius: 14px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 var(--font-body);
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.masthead { border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; }
.logo img { height: 34px; width: auto; }
.nav { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--muted); font-size: 15px; font-weight: 500; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { color: var(--text); text-decoration: none; }

/* Home hero */
.hero { padding: 56px 0 40px; }
.kicker { display: inline-block; font: 600 12px/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--link); margin-bottom: 14px; }
.hero-card { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.hero-card .art { aspect-ratio: 16 / 10; background: radial-gradient(circle at 30% 30%, var(--primary), transparent 60%), radial-gradient(circle at 80% 70%, var(--accent), transparent 55%), var(--surface-2); }
.hero-card .body { padding: 32px 36px 32px 0; }
.hero-card h1 { font-size: clamp(28px, 4vw, 42px); }
.hero-card h1 a { color: var(--text); }
.dek { color: var(--muted); font-size: 18px; margin: 0 0 18px; }
.meta { color: var(--muted); font-size: 14px; }

/* Article grid */
.section-title { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin: 48px 0 24px; }
.section-title h2 { font-size: 22px; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-3px); border-color: var(--primary); }
.card .thumb { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--primary), var(--accent)); opacity: .85; }
.card .thumb.alt { background: linear-gradient(135deg, var(--accent), var(--surface-2)); }
.card .thumb.alt2 { background: linear-gradient(135deg, var(--surface-2), var(--primary)); }
.card .body { padding: 20px 22px 24px; }
.card h3 { font-size: 20px; }
.card h3 a { color: var(--text); }
.card p { color: var(--muted); font-size: 15px; margin: 0 0 12px; }

/* Topics */
.topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.topic { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.topic strong { display: block; font-family: var(--font-head); font-size: 18px; color: var(--text); margin-bottom: 6px; }
.topic span { color: var(--muted); font-size: 14px; }

/* Article page */
.article-head { padding: 56px 0 28px; max-width: 760px; }
.article-head h1 { font-size: clamp(32px, 5vw, 48px); }
.prose { max-width: 720px; padding-bottom: 64px; }
.page-head { padding: 56px 0 20px; max-width: 760px; }
.page-head h1 { font-size: clamp(30px, 4.5vw, 44px); }
.empty { color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); padding: 28px; text-align: center; grid-column: 1 / -1; }
.prose h2 { font-size: 28px; margin-top: 1.8em; }
.prose h3 { font-size: 21px; margin-top: 1.5em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--primary); color: var(--muted); }
.prose code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.prose th { color: var(--text); font-family: var(--font-head); }
.callout { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 10px; padding: 18px 22px; margin: 1.6em 0; }
.byline-box { display: flex; gap: 16px; align-items: center; border-top: 1px solid var(--border); padding-top: 24px; margin-top: 40px; color: var(--muted); font-size: 15px; }
.byline-box img { width: 48px; height: 48px; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted); font-size: 14px; margin-top: 40px; }
.footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer h4 { color: var(--text); font: 600 14px var(--font-head); margin: 0 0 10px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 6px; }
.footer a { color: var(--muted); }
.footer .note { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 18px; }

@media (max-width: 900px) {
  .hero-card { grid-template-columns: minmax(0, 1fr); }
  .hero-card .body { padding: 0 24px 28px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer .wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .masthead .wrap { height: auto; flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px 16px; }
  .wrap { padding: 0 16px; }
  .grid, .topics { grid-template-columns: minmax(0, 1fr); }
}

/* Long words and URLs wrap instead of widening the page on phones */
h1, h2, h3, p, li, td, th, dd, blockquote { overflow-wrap: break-word; }

/* ===== SITE IDENTITY: Sport Data — broadcast data desk ===== */
:root { --ink: #0b1220; --ink-2: #152036; --radius: 6px; }
body { font-size: 16.5px; }
h1, h2, h3 { font-weight: 600; letter-spacing: .005em; }
.masthead { background: var(--ink); border-bottom: 3px solid var(--primary); backdrop-filter: none; }
.masthead .wrap { height: 64px; }
.nav a { color: #cbd5e1; font: 500 14px/1 var(--font-head); text-transform: uppercase; letter-spacing: .1em; }
.nav a:hover { color: #fff; }

.sd-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.35fr 1fr; gap: 44px; align-items: end;
  margin: 32px 0 8px; padding: 48px 44px 44px; border-radius: var(--radius); background: var(--ink); color: #e2e8f0; }
.sd-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 1px, transparent 1px 72px),
              repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, transparent 1px 72px),
              radial-gradient(circle at 85% 0%, rgba(190,18,60,.45), transparent 55%); }
.sd-hero > * { position: relative; }
.sd-hero .kicker { color: #7dd3fc; }
.sd-hero h1 { color: #fff; font-size: clamp(34px, 5vw, 58px); line-height: 1.02; text-transform: uppercase; margin-bottom: 18px; }
.sd-hero .dek { color: #94a3b8; margin: 0; max-width: 520px; }
.sd-metrics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sd-metrics li { background: var(--ink-2); border-top: 3px solid var(--primary); border-radius: 4px; padding: 14px 16px 16px; }
.sd-metrics li:nth-child(3n+2) { border-top-color: var(--accent); }
.sd-metrics b { display: block; font: 700 32px/1 var(--font-head); color: #fff; margin-bottom: 6px; }
.sd-metrics span { font-size: 13px; color: #94a3b8; }

.section-title { border-bottom: 2px solid var(--text); margin-top: 52px; }
.section-title h2 { text-transform: uppercase; letter-spacing: .06em; font-size: 19px; }
.section-title h2::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--primary); margin-right: 10px; vertical-align: 2px; }

.card { border-radius: var(--radius); }
.card .thumb { display: flex; align-items: flex-end; aspect-ratio: 16 / 7; padding: 14px 16px; opacity: 1;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 12px), linear-gradient(120deg, var(--ink), #1e293b 55%, var(--primary)); }
.card:nth-child(3n+2) .thumb { background: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 12px), linear-gradient(120deg, var(--ink), #1e293b 55%, #0369a1); }
.card .thumb span { font: 600 20px/1 var(--font-head); color: #fff; text-transform: uppercase; letter-spacing: .04em; }
.card .thumb:hover { text-decoration: none; }
.card h3 { font-size: 21px; line-height: 1.25; }
.card .meta { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }

.sd-topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--text); }
.sd-topic { padding: 22px 22px 26px 0; margin-left: 22px; border-right: 1px solid var(--border); }
.sd-topic:first-child { margin-left: 0; }
.sd-topic:last-child { border-right: 0; }
.sd-topic h3 { display: flex; gap: 10px; align-items: baseline; font-size: 19px; text-transform: uppercase; margin-bottom: 6px; }
.sd-topic h3 span { color: var(--primary); font-size: 15px; }
.sd-topic p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.sd-list { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.sd-list li { padding: 9px 0; border-top: 1px dashed var(--border); line-height: 1.4; }
.sd-list a { color: var(--text); font-weight: 500; }
.sd-list a::before { content: "→ "; color: var(--primary); }
.sd-topic .sd-soon { font-style: italic; font-size: 13px; }
a.sd-topic { color: var(--text); text-decoration: none; display: block; }
a.sd-topic:hover h3 { color: var(--primary); }
.sd-go { font: 600 13px/1 var(--font-head); text-transform: uppercase; letter-spacing: .08em; color: var(--primary); }

.footer { background: var(--ink); color: #94a3b8; border-top: 3px solid var(--primary); margin-top: 64px; }
.footer h4 { color: #fff; text-transform: uppercase; letter-spacing: .1em; font-size: 13px; }
.footer a { color: #cbd5e1; }
.footer .note { border-top-color: #1e293b; }

.article-head { padding-top: 48px; }
.article-head .kicker { background: var(--primary); color: #fff; padding: 7px 10px; border-radius: 2px; }
.article-head h1 { font-size: clamp(32px, 4.6vw, 50px); line-height: 1.08; }
.prose h2 { font-size: 25px; text-transform: uppercase; letter-spacing: .02em; border-top: 2px solid var(--text); padding-top: 14px; }
.prose th { background: var(--ink); color: #fff; font-weight: 500; letter-spacing: .03em; }
.prose td { font-variant-numeric: tabular-nums; }
.prose tbody tr:nth-child(even) { background: var(--surface); }
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 1.6em 0; }
.statgrid div { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--primary); padding: 14px 16px; }
.statgrid div:nth-child(2) { border-top-color: var(--accent); }
.statgrid b { display: block; font: 700 30px/1.1 var(--font-head); margin-bottom: 4px; }
.statgrid span { display: block; font-size: 14px; line-height: 1.45; color: var(--muted); }
.callout { border-left-color: var(--accent); border-radius: 4px; }
.table-note, .sources { font-size: 14px; color: var(--muted); }

@media (max-width: 900px) {
  .sd-hero { grid-template-columns: minmax(0, 1fr); padding: 34px 26px; gap: 28px; }
  .sd-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sd-topic { margin-left: 0; padding-left: 0; }
  .sd-topic:nth-child(even) { border-right: 0; padding-left: 22px; }
  .sd-topic:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 600px) {
  .sd-topics { grid-template-columns: minmax(0, 1fr); }
  .sd-topic, .sd-topic:nth-child(even) { border-right: 0; padding-left: 0; border-top: 1px solid var(--border); }
  .sd-metrics b { font-size: 26px; }
}

/* ===== TOOLS + READ NEXT (shared, uses the site's colours) ===== */
.tool { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 22px; margin: 1.2em 0 1.6em; }
.tool-h { font-size: 17px; margin: 4px 0 12px; }
.tool-h ~ .tool-h { margin-top: 20px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.tool-grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tool label, .tool legend { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); font-family: var(--font-body); }
.tool input, .tool textarea { font: 400 16px/1.4 var(--font-body); color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; width: 100%; min-width: 0; }
.tool textarea { resize: vertical; }
.tool select { font: 400 16px/1.4 var(--font-body); color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; width: 100%; }
.tool input:focus, .tool textarea:focus { outline: 2px solid var(--link); outline-offset: 1px; }
.tool input.bad, .tool textarea.bad { border-color: #dc2626; background: #fef2f2; color: #7f1d1d; }
.tool fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px 14px; margin: 0; min-width: 0; }
.tool legend { padding: 0 6px; color: var(--text); }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.tool button { font: 600 15px/1 var(--font-body); border: 0; border-radius: 8px; padding: 11px 16px; background: var(--primary); color: #fff; cursor: pointer; }
.tool button.secondary { background: transparent; color: var(--link); box-shadow: inset 0 0 0 1.5px var(--link); }
.tool-result { margin-top: 16px; }
.tool-result .table-wrap { margin-bottom: 0; }
.tool-big { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0 0 14px; }
.tool-big > div { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.tool-big b { display: block; font: 700 26px/1.15 var(--font-head); color: var(--text); font-variant-numeric: tabular-nums; }
.tool-big span { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); }
.tool-big .up { color: #b91c1c; } .tool-big .down { color: #047857; }
.tool-note { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.tool-verdict { font-weight: 600; margin: 0 0 12px; }
.tool .bar { display: block; height: 6px; margin-top: 4px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.tool .bar i { display: block; height: 100%; background: var(--primary); }
.tool td b { color: var(--text); }
.sg-matches { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 16px; }
.sg-match { display: grid; grid-template-columns: 1fr 52px 14px 52px 1fr; align-items: center; gap: 6px; font-size: 14px; }
.sg-match span:first-child { text-align: right; }
.sg-match input { text-align: center; padding: 8px 4px; }
.sg-match em { text-align: center; color: var(--muted); font-style: normal; }
.sg-table td:last-child { font-weight: 600; white-space: nowrap; }
.cp-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.cp-teams fieldset .tool-grid { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; }

.tool-teaser { display: flex; align-items: center; gap: 16px; margin: 20px 0 6px; padding: 16px 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.tool-teaser:hover { border-color: var(--link); text-decoration: none; }
.tool-teaser .ico { flex: none; width: 46px; height: 46px; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; font: 700 17px/1 var(--font-head); }
.tool-teaser b { display: block; font-family: var(--font-head); font-size: 19px; line-height: 1.25; }
.tool-teaser .t { display: block; color: var(--muted); font-size: 15px; line-height: 1.45; }
.tool-teaser::after { content: "→"; margin-left: auto; padding-left: 8px; color: var(--link); font-size: 22px; }
@media (max-width: 480px) {
  .tool-teaser { gap: 12px; padding: 14px 16px; align-items: flex-start; }
  .tool-teaser::after { display: none; }
  .tool-teaser .ico { width: 40px; height: 40px; font-size: 15px; }
  .tool-teaser b { font-size: 17px; }
}

.related { margin: 40px 0 8px; padding-top: 22px; border-top: 2px solid var(--border); }
.prose .related-h { font-size: 20px; margin: 0 0 8px; padding: 0; border: 0; text-transform: none; }
.prose .related-h::before, .prose .related-h::after { content: none; }
.related-list { list-style: none; padding: 0; margin: 0 0 18px; }
.related-list li { padding: 9px 0; border-bottom: 1px dashed var(--border); line-height: 1.4; }
.related-list a { font-weight: 600; }
.related-list span { color: var(--muted); font-size: 14px; }
.tool-cta { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); color: var(--text); text-decoration: none; }
.tool-cta:hover { text-decoration: none; border-color: var(--link); }
.tool-cta b { font-family: var(--font-head); font-size: 18px; }
.tool-cta b::after { content: " →"; color: var(--link); }
.tool-cta span { color: var(--muted); font-size: 15px; }

/* breadcrumbs + section pages */
.trail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 26px 0 -4px; font-size: 14px; color: var(--muted); font-family: var(--font-body); }
.trail a { color: var(--muted); text-decoration: none; }
.trail a:hover { color: var(--link); text-decoration: underline; }
.trail .sep { opacity: .55; }
.trail + .article-head, .trail + .page-head, .trail + .post-head, .trail + .entry-head { padding-top: 22px; }
.trail + .doc-title { margin-top: 18px; }
.prose:has(+ .hub-body) { padding-bottom: 0; }
.hub-body { margin: 6px 0 56px; }
.hub-h { font-size: 22px; margin: 30px 0 14px; }
.hub-empty { color: var(--muted); font-style: italic; padding: 10px 0; }
.hub-body .tool-cta { margin-top: 26px; }
.prose figure.chart { margin: 1.7em 0; }
.prose figure.chart img { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; border-radius: 10px; border: 1px solid var(--border); }
.prose figure.chart figcaption { max-width: 560px; margin: 8px auto 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
