/* Blackjack Strategy Trainer 21 — shared styles */

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

:root {
  --green-darker: #062806;
  --green-dark: #0A3D0A;
  --green-mid: #146B14;
  --green-light: #1E8C1E;
  --gold: #D4AF37;
  --gold-dim: #b08e22;
  --white: #F5F5F0;
  --text: #E8E8E0;
  --text-dim: #B0B0A0;
  --red: #d04848;
  --red-dim: #8a3333;
  --blue: #4a7cd1;
  --blue-dim: #2a5aa8;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--green-dark);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--gold); }
a:hover { text-decoration: underline; }

/* Site header (used on strategy pages) */
.site-header {
  background: linear-gradient(135deg, #062806 0%, var(--green-dark) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 1rem 1.5rem;
}

.site-header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  font-size: 1.05rem;
}

.site-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
  margin-left: 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--gold); }

/* Breadcrumbs */
.breadcrumbs {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.breadcrumbs a { color: var(--text-dim); text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs span[aria-current="page"] { color: var(--text); }
.breadcrumbs .sep { margin: 0 0.5rem; opacity: 0.6; }

/* Article layout */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.article-header {
  margin-bottom: 2.5rem;
}

.article-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.article-header .lede {
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.6;
}

.article-header .meta {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.article-body h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
}

.article-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gold);
  margin: 1.75rem 0 0.75rem;
}

.article-body p {
  margin-bottom: 1.1rem;
  color: var(--text);
}

.article-body ul, .article-body ol {
  margin: 0 0 1.1rem 1.5rem;
}

.article-body li {
  margin-bottom: 0.4rem;
  color: var(--text);
}

.article-body strong { color: var(--white); }

.article-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 0.5rem 0 0.5rem 1rem;
  margin: 1.5rem 0;
  color: var(--text);
  font-style: italic;
  background: rgba(255,255,255,0.04);
}

.article-body code {
  background: rgba(255,255,255,0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Strategy chart table */
.strategy-chart {
  margin: 1.5rem 0;
  overflow-x: auto;
  border-radius: 8px;
}

.strategy-chart table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 540px;
}

.strategy-chart caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  color: var(--gold);
  padding-bottom: 0.5rem;
}

.strategy-chart th,
.strategy-chart td {
  padding: 0.5rem 0.4rem;
  text-align: center;
  border: 1px solid rgba(0,0,0,0.3);
  font-weight: 600;
}

.strategy-chart thead th {
  background: var(--green-darker);
  color: var(--gold);
  font-size: 0.8rem;
}

.strategy-chart tbody th {
  background: var(--green-mid);
  color: var(--white);
}

/* Action cells */
.act-H { background: #c8523c; color: #fff; }    /* Hit - red */
.act-S { background: #f1d35e; color: #1a1a1a; } /* Stand - yellow */
.act-D { background: #5fb95f; color: #fff; }    /* Double - green */
.act-Ds { background: #3a8a3a; color: #fff; }   /* Double or Stand */
.act-P { background: #4a90d1; color: #fff; }    /* Split - blue */
.act-SU { background: #a067c6; color: #fff; }   /* Surrender - purple */
.act-N { background: #6a6a6a; color: #fff; }    /* No / fallback */
.act-H17 { background: #c8523c; color: #fff; font-style: italic; } /* H17-specific differences */

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem 0 1.5rem;
  font-size: 0.85rem;
}
.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.chart-legend i {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

/* Comparison & data tables */
.data-table {
  margin: 1.5rem 0;
  overflow-x: auto;
}
.data-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.data-table th,
.data-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.data-table th {
  background: rgba(255,255,255,0.05);
  color: var(--gold);
  font-weight: 600;
}
.data-table caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  color: var(--gold);
  padding-bottom: 0.5rem;
}

/* Callouts */
.callout {
  background: rgba(212,175,55,0.08);
  border-left: 3px solid var(--gold);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}
.callout h4 {
  color: var(--gold);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* CTA banner inside articles */
.app-cta {
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  margin: 2.5rem 0;
}
.app-cta h3 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.app-cta p {
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.app-cta .cta-btn {
  display: inline-block;
  background: var(--gold);
  color: #1a1a1a;
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  text-decoration: none;
}
.app-cta .cta-btn:hover { transform: translateY(-2px); }

/* Related links */
.related-links {
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2.5rem;
}
.related-links h3 {
  color: var(--gold);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}
.related-links ul {
  list-style: none;
  margin: 0;
}
.related-links li {
  margin-bottom: 0.5rem;
}
.related-links a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dotted rgba(212,175,55,0.4);
}
.related-links a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Hub cards */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.hub-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  display: block;
  transition: transform 0.15s, border-color 0.15s;
}
.hub-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  text-decoration: none;
}
.hub-card h3 {
  color: var(--gold);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.hub-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 3rem;
}

footer a {
  color: var(--gold);
  text-decoration: none;
}
footer a:hover { text-decoration: underline; }

.footer-links { margin-bottom: 0.75rem; }
.footer-links a + a { margin-left: 1.5rem; }

/* Responsive */
@media (max-width: 600px) {
  .article-header h1 { font-size: 1.75rem; }
  .article-body h2 { font-size: 1.35rem; }
  .site-header-inner { gap: 0.5rem; }
  .site-nav a { margin-left: 0.75rem; font-size: 0.85rem; }
}
