/*
Theme Name: Tech Presswire
Theme URI: https://sportspresswire.com
Author: Triforce Media
Description: Bespoke finance-news theme for Sports Presswire — a hub for publicly traded sports stocks.
Version: 0.7.1
License: GPL-2.0
*/

:root {
  --bg: #070b14;
  --bg-2: #0d1322;
  --surface: #111a2e;
  --surface-2: #16213a;
  --line: #22304f;
  --text: #e8edf7;
  --muted: #93a0bd;
  --up: #16c784;
  --down: #ea3943;
  --accent: #00A8C6;        /* brand crimson */
  --brand: #063667;         /* deep brand crimson */
  --brand-navy: #131B24;    /* brand navy */
  --link: #6CD0E0;          /* lighter crimson for body links */
  --gold: #f5c518;
  --radius: 14px;
  --shadow: 0 6px 22px rgba(0, 0, 0, .30);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 70% -10%, #142039 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
html { scroll-behavior: smooth; }
::selection { background: var(--accent); color: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
img { max-width: 100%; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- Ticker tape (snapshot-driven marquee — instant, no API calls) ---------- */
.tape { background: #05080f; border-bottom: 1px solid var(--line); overflow: hidden; }
.tape-track { display: inline-flex; white-space: nowrap; padding: 9px 0; will-change: transform; animation: tkscroll 70s linear infinite; }
.tape:hover .tape-track { animation-play-state: paused; }
.tk-item { display: inline-flex; align-items: center; gap: 6px; padding: 0 18px; border-right: 1px solid #15203a; font-size: 13px; }
.tk-item a { color: var(--text); display: inline-flex; gap: 6px; }
.tk-item a:hover { text-decoration: none; opacity: .85; }
.tk-item b { color: #fff; font-weight: 700; }
.tk-item .tp { color: var(--muted); }
.tk-item .tpp { font-weight: 700; }
.tk-item.up .tpp { color: var(--up); }
.tk-item.down .tpp { color: var(--down); }
.tk-item.flat .tpp { color: var(--muted); }
@keyframes tkscroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tape-track { animation: none; flex-wrap: wrap; } }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(7, 11, 20, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: #fff; }
.brand img { height: 46px; width: auto; display: block; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), #063667); display: grid; place-items: center; color: #fff; font-size: 16px; }
.brand small { display: block; font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
nav.primary { margin-left: auto; }
nav.primary ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
nav.primary a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 14px; }
nav.primary a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 10px; margin-left: auto; border-radius: 8px; }
.nav-toggle:hover { background: var(--surface); }

/* ---------- Buttons / chips ---------- */
.btn { display: inline-block; padding: 12px 22px; border-radius: 10px; font-weight: 700; background: var(--accent); color: #fff; transition: transform .12s; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.chip { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.badge { display: inline-block; background: var(--surface-2); border: 1px solid var(--line); color: #fff; border-radius: 6px; padding: 2px 8px; font-weight: 800; font-size: 12px; letter-spacing: .03em; }
.up { color: var(--up); } .down { color: var(--down); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 28px; text-align: center; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); background: linear-gradient(90deg, #fff, #A8E4EE); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 640px; margin: 14px auto 22px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; }

/* ---------- Section ---------- */
.section { padding: 30px 0; }
.section h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.section h2 .more { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.section-head .sub { color: var(--muted); font-size: 13px; }

/* ---------- Card / grid ---------- */
.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid.cols-4, .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

.card { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.03); transition: transform .18s cubic-bezier(.2,.7,.2,1), border-color .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-1px); border-color: #2f4068; box-shadow: 0 10px 28px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.045); }

/* company mini card */
.stock-card { display: block; color: var(--text); }
.stock-card .row1 { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.stock-card .name { font-weight: 700; font-size: 15px; }
.stock-card .price { font-size: 22px; font-weight: 800; margin-top: 8px; }
.stock-card .meta { color: var(--muted); font-size: 12px; }

/* movers */
.movers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .movers-grid { grid-template-columns: 1fr; } }
.mover-list { list-style: none; margin: 0; padding: 0; }
.mover-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.mover-list li:last-child { border-bottom: 0; }
.mover-list .tk { font-weight: 800; width: 64px; }
.mover-list .nm { color: var(--muted); font-size: 13px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mover-list .pc { font-weight: 700; width: 82px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* vertical tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile { display: block; padding: 22px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-align: left; transition: transform .18s cubic-bezier(.2,.7,.2,1), border-color .18s ease; }
.tile:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.tile .ic { font-size: 24px; }
.tile .nm { font-weight: 700; margin-top: 8px; }
.tile .ct { color: var(--muted); font-size: 12px; }

/* news list */
.news-card { color: var(--text); display: flex; flex-direction: column; gap: 8px; }
.news-card .when { color: var(--muted); font-size: 12px; }
.news-card h3 { font-size: 16px; margin: 0; }
.news-card .tag { align-self: flex-start; }

/* ---------- Static / resource page prose ---------- */
.page-prose { padding: 28px 0 50px; }
.page-prose h1 { font-size: clamp(26px, 4vw, 36px); }
.page-prose .lead { color: var(--muted); font-size: 17px; max-width: 720px; }
.page-prose .body { max-width: 780px; font-size: 16px; line-height: 1.7; }
.page-prose .body h2 { font-size: 21px; margin-top: 1.4em; }
.page-prose .body p { margin: 0 0 1em; }
.page-prose .body a { color: var(--link); }
.page-prose .body ul { margin: 0 0 1em 1.2em; }
.page-prose .body li { margin: 0 0 .5em; }
.page-prose .glossary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; }
@media (max-width: 700px) { .page-prose .glossary { grid-template-columns: 1fr; } }
.page-prose .glossary dt { font-weight: 800; color: var(--text); margin-top: 10px; }
.page-prose .glossary dd { margin: 0 0 4px; color: var(--muted); font-size: 14px; }

/* ---------- Company page ---------- */
.company { padding: 28px 0 50px; }
.company .head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.company .head h1 { font-size: 30px; margin: 0; }
.company .sub { color: var(--muted); margin: 4px 0 18px; }
.chart-box { background: var(--surface); border-radius: var(--radius); padding: 14px; border: 1px solid var(--line); }
.company-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
@media (max-width: 800px) { .company-grid { grid-template-columns: 1fr; } }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.dl dt { color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }

/* ---------- Article ---------- */
.article { padding: 28px 0 60px; }
.article .crumb { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.article h1 { font-size: clamp(26px, 4vw, 38px); }
.article .meta { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.article .body { font-size: 17px; line-height: 1.75; max-width: 760px; }
.article .body h2 { font-size: 22px; margin-top: 1.4em; }
.article .body p { margin: 0 0 1.1em; }
.article .body a { color: var(--link); }
.article .src { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 26px; max-width: 760px; }

/* ---------- Directory ---------- */
.dir-group { margin-bottom: 30px; }
.dir-group h2 { font-size: 19px; text-transform: capitalize; border-bottom: 2px solid var(--line); padding-bottom: 8px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #05080f; margin-top: 40px; padding: 38px 0 0; color: var(--muted); font-size: 14px; }
.site-footer .fcols { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 28px; }
@media (max-width: 780px) { .site-footer .fcols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .fcols { grid-template-columns: 1fr; } }
.site-footer .fbrand img { height: 44px; width: auto; margin-bottom: 12px; }
.site-footer h4 { color: var(--text); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 8px; }
.site-footer a { color: var(--muted); display: block; padding: 4px 0; font-size: 13px; transition: color .15s ease; }
.site-footer a:hover { color: var(--text); text-decoration: none; }
.site-footer .fdisc { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 12px; margin-top: 16px; }
.site-footer .fbottom { border-top: 1px solid var(--line); padding: 16px 0; font-size: 12px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; opacity: .85; }
.site-footer .fbottom a { display: inline; color: var(--accent); padding: 0; font-weight: 600; }

.empty { color: var(--muted); font-style: italic; padding: 14px 0; }

/* alpha-stock widget readability on dark bg */
.alpha-stock-card, .asw-card, .asw-mini, .asw-micro { color: #111; }

/* ---------- Movers rows clickable ---------- */
.mover-list li { padding: 0; }
.mover-list a { display: flex; align-items: center; gap: 10px; padding: 9px 0; color: var(--text); flex: 1 1 auto; }
.mover-list a:hover { text-decoration: none; background: rgba(255,255,255,.02); }

/* ---------- Market leaders ranking (homepage) ---------- */
.leader-table { width: 100%; border-collapse: collapse; }
.leader-table th, .leader-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.leader-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.leader-table .rk { color: var(--muted); width: 30px; }
.leader-table td.cap { text-align: right; font-weight: 700; white-space: nowrap; }
.leader-table a { color: var(--text); font-weight: 600; }
.leader-table tr:hover td { background: rgba(255,255,255,.02); }

/* ---------- Byline on news cards ---------- */
.news-card .by { color: var(--muted); font-size: 12px; }
.news-card .by b { color: var(--text); font-weight: 600; }

/* ============================================
   NEWSLETTER LEAD BAR (above the fold, every page)
   ============================================ */
.nl-bar { background: linear-gradient(90deg, var(--brand), var(--accent)); border-bottom: 1px solid rgba(0,0,0,.25); }
.nl-bar .wrap { display: flex; align-items: center; gap: 18px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.nl-bar .nl-copy { color: #fff; line-height: 1.3; }
.nl-bar .nl-copy b { font-size: 16px; display: block; }
.nl-bar .nl-copy span { font-size: 13px; opacity: .92; }
.nl-bar .nl-form { margin-left: auto; flex: 1 1 320px; min-width: 280px; max-width: 620px; }
.nl-bar .gform_wrapper { margin: 0 !important; max-width: none; }
.nl-bar .gform_wrapper form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nl-bar .gform_body, .nl-bar ul.gform_fields { display: contents; }
.nl-bar li.gfield { margin: 0; padding: 0; display: flex; align-items: center; }
.nl-bar .nl-first { flex: 0 0 130px; }
.nl-bar .nl-email { flex: 1 1 160px; }
.nl-bar .nl-consent { flex: 1 1 100%; color: #fff; font-size: 12px; }
.nl-bar .nl-consent .gchoice { display: flex; align-items: center; gap: 6px; }
.nl-bar .nl-consent input[type="checkbox"] { width: 15px; height: 15px; flex: 0 0 auto; }
.nl-bar .gfield_label, .nl-bar .gfield_required, .nl-bar .gfield_description, .nl-bar .gform_validation_errors, .nl-bar .validation_message { display: none !important; }
.nl-bar input[type="text"], .nl-bar input[type="email"] { width: 100%; padding: 11px 12px; border-radius: 8px; border: 0; font-size: 14px; background: #fff; color: #111; }
.nl-bar .gform_footer { margin: 0; padding: 0; flex: 0 0 auto; }
.nl-bar .gform_button, .nl-bar input[type="submit"] { background: #fff; color: var(--brand); font-weight: 800; border: 0; border-radius: 8px; padding: 11px 20px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.nl-bar .gform_button:hover { opacity: .92; }
.nl-bar .gform_ajax_spinner { display: none; }
.nl-bar .gform_confirmation_wrapper { background: rgba(255,255,255,.16); color: #fff; padding: 12px 14px; border-radius: 8px; font-weight: 600; flex: 1 1 100%; }
.nl-bar .gform_confirmation_message { margin: 0; color: #fff; }

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 760px) {
	.wrap { padding: 0 14px; }
	.site-header .wrap { gap: 10px; padding-top: 10px; padding-bottom: 10px; }
	.brand img { height: 38px; }
	.brand small { display: none; }
	.nav-toggle { display: block; }
	nav.primary { position: absolute; top: 100%; left: 0; right: 0; margin: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 6px 14px 14px; max-height: 85vh; overflow-y: auto; display: none; }
	nav.primary.open { display: block; }
	nav.primary ul { flex-direction: column; flex-wrap: nowrap; gap: 0; }
	nav.primary li { width: 100%; }
	nav.primary a { padding: 13px 6px; white-space: normal; border-bottom: 1px solid var(--line); border-radius: 0; }
	nav.primary li:last-child a { border-bottom: 0; }
	.hero { padding: 30px 0 16px; }
	.hero p.lead { font-size: 16px; }
	.hero .cta .btn { padding: 10px 16px; font-size: 14px; }
	.section { padding: 20px 0; }
	.section h2, .dir-group h2 { font-size: 18px; }
	.card { padding: 14px; }
	.stock-card .price { font-size: 18px; }
	.company .head h1 { font-size: 24px; }
	.company .head { gap: 8px; }
	.article h1 { font-size: 24px; }
	.article .body { font-size: 16px; }
	.movers-grid { gap: 12px; }
	.mover-list .tk { width: 54px; }
	.site-footer .fcols { gap: 18px; }
	.tk-item { padding: 0 12px; font-size: 12px; }
	.nl-bar .nl-copy span { display: none; }
	.nl-bar .nl-first { flex: 1 1 100%; }
	.nl-bar .nl-email { flex: 1 1 100%; }
	.nl-bar .gform_footer { flex: 1 1 100%; }
	.nl-bar .gform_button { width: 100%; }
}
@media (max-width: 420px) {
	.grid.cols-4 { grid-template-columns: 1fr 1fr; }
	.tiles { grid-template-columns: 1fr 1fr; }
	.hero h1 { font-size: 26px; }
}

/* ---------- Company chart: full width, financials below (no slider) ---------- */
.chart-box .asw-chart__body { grid-template-columns: 1fr !important; }
.chart-box .asw-chart__canvas-wrap { border-right: 0 !important; border-bottom: 1px solid var(--line); }
.chart-box .asw-chart__financials { max-height: none !important; overflow: visible !important; padding: 16px 6px 4px; }

/* ---------- External links (company page) ---------- */
.extlinks { display: flex; flex-wrap: wrap; gap: 8px; }
.extlink { display: inline-block; padding: 8px 13px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-size: 13px; font-weight: 600; transition: transform .15s ease, border-color .15s ease; }
.extlink:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }

/* ---------- Newsletter bar: phone field ---------- */
.nl-bar .nl-phone { flex: 0 0 130px; }
@media (max-width: 760px) { .nl-bar .nl-phone { flex: 1 1 100%; } }

/* ===== Secondary brand blue (#266CA4) accents — added per colour scheme ===== */
:root { --blue: #266CA4; }
.nl-bar { background: linear-gradient(90deg, var(--brand), var(--blue) 60%, var(--accent)); }
.section-head { border-bottom-color: rgba(38, 108, 164, .55); }
.section h2::before {
  content: ""; display: inline-block; width: 4px; height: .9em;
  background: var(--blue); border-radius: 3px; margin-right: 4px;
}
