:root {
  --brand: #d7192f;
  --brand-dark: #a90f21;
  --gold: #f2b705;
  --blue: #155eef;
  --green: #11845b;
  --ink: #182230;
  --muted: #667085;
  --bg: #f6f8fc;
  --panel: #fff;
  --line: #dde3ec;
  --soft: #fff7de;
  --shadow: 0 14px 34px rgba(24, 34, 48, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #fffdf5 0, var(--bg) 42%, #eef4ff 100%);
  overflow-x: hidden;
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; }
.skip-link { position: absolute; left: -999px; top: .5rem; z-index: 9999; background: #fff; padding: .6rem .8rem; border-radius: 8px; }
.skip-link:focus { left: .5rem; }

.portal-nav {
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid rgba(24,34,48,.10);
  box-shadow: 0 8px 24px rgba(24,34,48,.08);
  backdrop-filter: blur(16px) saturate(145%);
}
.navbar-brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink) !important; letter-spacing: 0; }
.navbar-brand img { width: 46px; height: 46px; object-fit: contain; border-radius: 8px; background: #fff; box-shadow: 0 5px 14px rgba(24,34,48,.10); }
.navbar-brand span { display: grid; line-height: 1.12; }
.navbar-brand small { color: var(--muted); font-size: .72rem; font-weight: 600; }
.nav-link { display: inline-flex; align-items: center; gap: .4rem; color: #344054 !important; border-radius: 8px; padding: .58rem .78rem !important; font-weight: 750; font-size: .92rem; }
.nav-link:hover, .nav-link.active { color: #fff !important; background: var(--brand); box-shadow: 0 8px 18px rgba(215,25,47,.22); }
.dropdown-menu {
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 40px;
  color: #344054;
  font-weight: 700;
}
.dropdown-item:hover,
.dropdown-item:focus {
  color: var(--brand);
  background: #fff4f5;
}
.navbar-toggler { min-width: 46px; min-height: 46px; border-color: #cdd5e1; }

.portal-search { position: relative; display: flex; align-items: center; margin-left: .8rem; border: 1px solid #cdd5e1; border-radius: 8px; background: #fff; }
.portal-search input { width: 230px; min-height: 42px; border: 0; outline: 0; padding: .45rem .65rem; background: transparent; }
.portal-search button { width: 42px; min-height: 42px; border: 0; border-left: 1px solid #e4e8f0; background: transparent; color: var(--brand); }
.search-suggestions { position: absolute; top: calc(100% + .4rem); right: 0; z-index: 20; display: none; width: min(420px, 90vw); padding: .45rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.search-suggestions a { display: block; padding: .65rem .75rem; color: var(--ink); text-decoration: none; border-radius: 6px; }
.search-suggestions a:hover { background: #fff4f5; color: var(--brand); }

.site-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.portal-hero, .home-hero {
  position: relative;
  display: grid;
  gap: 1.5rem;
  margin: 1.6rem 0;
  padding: clamp(1.4rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,248,223,.92)),
    repeating-linear-gradient(135deg, rgba(215,25,47,.05) 0 1px, transparent 1px 18px);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.home-hero { grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); align-items: center; }
.portal-hero h1, .home-hero h1 { max-width: 920px; margin: .55rem 0 .75rem; font-size: clamp(2.05rem, 5vw, 4.1rem); line-height: 1.04; font-weight: 850; letter-spacing: 0; text-wrap: balance; }
.portal-hero p, .home-hero p { max-width: 760px; color: #596579; font-size: 1.08rem; line-height: 1.7; }
.section-label { display: inline-flex; align-items: center; gap: .45rem; padding: .42rem .68rem; border: 1px solid #f5d56f; border-radius: 8px; background: #fff7de; color: #765100; font-size: .75rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.section-label::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(17,132,91,.14); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.2rem; }

.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border-radius: 8px; font-weight: 750; }
.btn-brand { color: #fff; border-color: var(--brand); background: linear-gradient(135deg, var(--brand), #ec4356); box-shadow: 0 10px 22px rgba(215,25,47,.22); }
.btn-brand:hover { color: #fff; background: var(--brand-dark); }
.btn-outline-dark { background: #fff; border-color: #cbd3df; color: #344054; }
.btn-outline-dark:hover { color: #fff; background: #263244; }

.breadcrumbs { margin: 1rem 0 -.4rem; font-size: .9rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 0; list-style: none; color: var(--muted); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: .45rem; color: #9aa4b2; }
.breadcrumbs a { color: #475467; text-decoration: none; }

.portal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.6rem; align-items: start; }
.portal-main { min-width: 0; }
.portal-section, .tool-panel, .home-panel, .trust-page .portal-section {
  margin: 1rem 0;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
}
.portal-section h1, .portal-section h2, .tool-panel h2, .home-panel h2 { margin-bottom: .75rem; font-weight: 850; letter-spacing: 0; }
.portal-section p, .tool-panel p, .home-panel p { color: #4f5d73; line-height: 1.78; }
.portal-section li { margin-bottom: .45rem; color: #4f5d73; }
.portal-aside { position: sticky; top: 116px; align-self: start; padding-top: .75rem; }
.sticky-box { padding: 1rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.sticky-box h2 { font-size: 1.15rem; font-weight: 850; }
.sticky-box .btn { width: 100%; }
.sticky-box .btn + .btn { margin-top: .65rem !important; }

.resource-grid, .feature-grid, .metric-grid, .odds-cards, .schedule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}
.resource-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.resource-card, .feature-card, .metric-card, .odds-cards article, .schedule-grid article {
  display: grid;
  gap: .35rem;
  min-height: 132px;
  padding: 1rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(24,34,48,.07);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.resource-card:hover, .feature-card:hover { transform: translateY(-3px); border-color: rgba(215,25,47,.35); box-shadow: 0 14px 28px rgba(24,34,48,.12); }
.resource-card i, .feature-card i { width: 42px; height: 42px; display: grid; place-items: center; color: #3b2600; border-radius: 8px; background: linear-gradient(135deg, #ffe27a, var(--gold)); }
.resource-card span, .feature-card strong { font-weight: 850; }
.resource-card small, .feature-card small, .schedule-grid span { color: var(--muted); }
.metric-card strong, .odds-cards strong { display: block; color: var(--brand); font-size: 1.25rem; }

.home-tool { display: grid; gap: 1rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.number-balls { display: flex; flex-wrap: wrap; gap: .45rem; min-height: 54px; }
.ball { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #2b1a00; background: radial-gradient(circle at 34% 26%, #fff 0 9%, #fff3a8 22%, #ffc629 56%, #d88b00 100%); border: 2px solid #ffe28a; font-weight: 850; box-shadow: 0 7px 15px rgba(95,62,0,.16); }
.tool-result { margin-top: 1rem; padding: .9rem; border: 1px solid #e5eaf2; border-radius: 8px; background: #f8fafc; color: #344054; min-height: 52px; }

.faq-list details { margin: .65rem 0; border: 1px solid #e4e8f0; border-radius: 8px; background: #fff; }
.faq-list summary { cursor: pointer; padding: .85rem 1rem; font-weight: 800; }
.faq-list details p { padding: 0 1rem 1rem; margin: 0; }
.glossary-list article { padding: .85rem 0; border-bottom: 1px solid #e7ebf2; }
.glossary-list article:last-child { border-bottom: 0; }
.glossary-list h3 { font-size: 1.05rem; font-weight: 850; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1rem;
  color: #596579;
  font-size: .9rem;
  font-weight: 700;
}
.article-meta span {
  padding: .35rem .55rem;
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  background: #fff;
}
.article-callout {
  border-left: 5px solid var(--gold);
  background: #fffaf0;
}
.article-callout ul {
  margin-bottom: 0;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.analytics-panel,
.analytics-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
}
.analytics-panel.wide {
  grid-column: 1 / -1;
}
.analytics-panel-head,
.analytics-card-title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}
.analytics-panel h2,
.analytics-card h3 {
  margin: .45rem 0 0;
  font-weight: 850;
  font-size: 1.18rem;
}
.chart-box {
  position: relative;
  width: 100%;
  height: 240px;
  max-height: 240px;
}
.chart-box-wide {
  height: 260px;
  max-height: 260px;
}
.chart-box canvas {
  max-height: 100%;
}
.analytics-card-title span {
  flex: 0 0 auto;
  padding: .35rem .55rem;
  color: #694100;
  border: 1px solid #f1d67c;
  border-radius: 8px;
  background: #fff8df;
  font-size: .82rem;
  font-weight: 800;
}
.analytics-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.analytics-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin: 1rem 0;
}
.analytics-mini div {
  padding: .75rem;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: #f8fafc;
}
.analytics-mini span {
  display: block;
  color: var(--muted);
  font-size: .82rem;
}
.analytics-mini strong {
  color: var(--brand);
}
.analytics-card h4 {
  margin-top: .9rem;
  font-size: .95rem;
  font-weight: 850;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.tag-row span {
  display: inline-flex;
  align-items: baseline;
  gap: .25rem;
  padding: .35rem .52rem;
  color: #fff;
  border-radius: 999px;
  background: var(--brand);
  font-weight: 850;
}
.tag-row.muted span {
  color: #344054;
  background: #eef2f7;
}
.tag-row small {
  opacity: .82;
  font-weight: 700;
}

.ad-placeholder,
.ad-unit {
  display: grid;
  place-items: center;
  min-height: 96px;
  margin: 1.15rem 0;
  border: 1px dashed #c6ceda;
  border-radius: 8px;
  color: #8a94a6;
  background: rgba(255,255,255,.62);
  font-size: .78rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.ad-unit-horizontal {
  width: 100%;
  min-height: 96px;
}
.portal-main > .ad-unit-horizontal,
.home-panel + .ad-unit-horizontal {
  margin-block: 1.2rem;
}
.portal-footer { margin-top: 3rem; padding: 2.5rem 0 1.5rem; color: #344054; border-top: 1px solid #dfe5ee; background: #fff; }
.footer-top { display: grid; grid-template-columns: minmax(260px, .8fr) 1.2fr; gap: 2rem; }
.footer-top img { border-radius: 8px; box-shadow: 0 5px 14px rgba(24,34,48,.10); }
.footer-top h2 { margin: .75rem 0 .4rem; font-weight: 850; }
.footer-top p, .footer-bottom p { color: #596579; line-height: 1.7; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.footer-links h3 { font-size: .95rem; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.footer-links a { display: block; margin: .45rem 0; color: #475467; text-decoration: none; font-weight: 650; }
.footer-links a:hover { color: var(--brand); }
.footer-bottom { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid #e6ebf2; font-size: .92rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
@media (max-width: 1199.98px) {
  .portal-search { margin: .75rem 0 0; width: 100%; }
  .portal-search input { width: 100%; }
}
@media (max-width: 991.98px) {
  .home-hero, .portal-layout, .footer-top { grid-template-columns: 1fr; }
  .portal-aside { position: static; padding-top: 0; }
  .resource-grid, .feature-grid, .metric-grid, .odds-cards, .schedule-grid, .analytics-grid, .analytics-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .site-shell { width: min(100% - 1rem, 1180px); }
  .navbar-brand small { display: none; }
  .navbar-brand span strong { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .portal-hero, .home-hero, .portal-section, .tool-panel, .home-panel { padding: 1rem; }
  .resource-grid, .resource-grid.compact, .feature-grid, .metric-grid, .odds-cards, .schedule-grid, .analytics-grid, .analytics-cards, .analytics-mini, .footer-links { grid-template-columns: 1fr; }
  .ball { width: 42px; height: 42px; }
  .chart-box,
  .chart-box-wide { height: 220px; }
}
