/* Site redesign, variant A (owner pick 2026-10-28): dark, high contrast. Self-hosted, system fonts,
   no external assets (CSP unchanged). Loaded after base.html's own styles.
   Site-wide: the Prediction Lab bar and the nav. Page bodies opt in with body class "ycg-a"
   (the home page and /ai-predictions); every other page keeps its current look. */
:root {
  --a-bg: #0b0f17; --a-bg-2: #111827; --a-surface: #151d2b; --a-surface-2: #1c2638;
  --a-line: #263247; --a-text: #f3f6fb; --a-muted: #a3b0c2; --a-accent: #4fb3ff; --a-accent-ink: #04121f;
  --a-accent-2: #8be0b0; --a-bar-bg: #1f2a3d; --a-warn: #ffcf5c;
}

/* ---- site-wide: nav ---- */
.navbar { background: var(--a-bg) !important; box-shadow: none; border-bottom: 1px solid var(--a-line); }
.navbar .nav-link { color: var(--a-muted) !important; border-radius: 8px; }
.navbar .nav-link:hover { color: var(--a-text) !important; background: var(--a-surface-2); }
.navbar .nav-link.active { color: var(--a-text) !important; border-bottom: 2px solid var(--a-accent); }
.navbar .navbar-brand { color: var(--a-text) !important; font-weight: 800; }

/* ---- page body, opt-in ---- */
body.ycg-a { background: var(--a-bg); color: var(--a-text); }
body.ycg-a .main-content { padding: 0; }
body.ycg-a a { color: var(--a-accent); }
body.ycg-a .text-muted { color: var(--a-muted) !important; }
body.ycg-a .card { background: var(--a-surface); color: var(--a-text); border: 1px solid var(--a-line); box-shadow: none; }
body.ycg-a footer { background: var(--a-bg) !important; border-top: 1px solid var(--a-line) !important; }
body.ycg-a footer, body.ycg-a footer a, body.ycg-a footer .text-muted { color: var(--a-muted) !important; }
/* Bootstrap 5.3 leaves --bs-modal-color empty, so modals would inherit the light body text on their
   white background: give them Bootstrap's own dark body colour back. */
body.ycg-a .modal-content { color: #212529; }
body.ycg-a .modal-content .text-muted { color: #6c757d !important; }
body.ycg-a .ycg-video-sub { color: var(--a-muted); }
body.ycg-a .alert-success { background: var(--a-surface-2); color: var(--a-text); border-color: var(--a-line); }

.a-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.a-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; font-weight: 700; color: var(--a-muted); margin: 0 0 12px; }
.a-ph { display: inline-block; padding: 1px 6px; border: 1px dashed var(--a-warn); color: var(--a-warn); border-radius: 4px;
  font: 600 .78em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.a-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; border-radius: 10px;
  padding: 12px 20px; border: 1px solid transparent; font-size: .95rem; text-decoration: none; }
body.ycg-a .a-btn-primary { background: var(--a-accent); color: var(--a-accent-ink); }
body.ycg-a .a-btn-ghost { border-color: var(--a-line); color: var(--a-text); background: transparent; }
.a-btn-sm { padding: 7px 13px; font-size: .85rem; border-radius: 8px; }

.a-hero { background: radial-gradient(1100px 520px at 78% -10%, rgba(79,179,255,.22), transparent 60%),
  radial-gradient(800px 420px at 0% 0%, rgba(139,224,176,.10), transparent 60%), var(--a-bg); padding: 72px 0 56px; }
.a-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.a-hero h1 { font-size: .95rem; letter-spacing: .14em; text-transform: uppercase; color: var(--a-accent); margin: 0 0 14px; font-weight: 700; }
.a-hero h2 { font-size: 3.35rem; line-height: 1.04; letter-spacing: -.025em; margin: 0 0 18px; font-weight: 800; color: var(--a-text); }
.a-lede { font-size: 1.2rem; color: var(--a-muted); margin: 0 0 28px; font-weight: 600; }
.a-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.a-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--a-muted); font-size: .84rem; list-style: none; padding: 0; margin: 0; }
.a-trust li::before { content: "\2713"; color: var(--a-accent-2); font-weight: 800; margin-right: 7px; }

.a-panel { background: var(--a-surface); border: 1px solid var(--a-line); border-radius: 18px; padding: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.a-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.a-panel-title { font-weight: 700; font-size: .9rem; }
.a-chip { font-size: .76rem; padding: 4px 10px; border-radius: 999px; background: var(--a-surface-2); color: var(--a-muted); border: 1px solid var(--a-line); }
.a-lb { display: grid; grid-template-columns: 110px 1fr 54px; gap: 12px; align-items: center; padding: 7px 0; font-size: .84rem;
  border-bottom: 1px solid var(--a-line); color: var(--a-muted); }
.a-lb:last-of-type { border-bottom: 0; }
.a-lb.win { color: var(--a-text); font-weight: 700; }
.a-bar { height: 8px; border-radius: 6px; background: var(--a-bar-bg); overflow: hidden; }
.a-bar i { display: block; height: 100%; background: var(--a-accent); border-radius: 6px; }
.a-lb.win .a-bar i { background: var(--a-accent-2); }
.a-panel-foot { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.a-band { padding: 64px 0; border-top: 1px solid var(--a-line); }
.a-band.alt { background: var(--a-bg-2); }
.a-h { font-size: 2.2rem; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 12px; font-weight: 800; color: var(--a-text); }
.a-sub { color: var(--a-muted); max-width: 720px; font-size: 1.05rem; margin: 0 0 32px; }
.a-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.a-grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.a-tile { background: var(--a-surface); border: 1px solid var(--a-line); border-radius: 14px; padding: 22px; }
.a-tile .ico { font-size: 1.7rem; line-height: 1; margin-bottom: 12px; }
.a-tile h4 { margin: 0 0 8px; font-size: 1.02rem; font-weight: 700; color: var(--a-text); }
.a-tile p { margin: 0 0 8px; color: var(--a-muted); font-size: .92rem; }
.a-tile p:last-child { margin-bottom: 0; }

.a-pipe { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.a-pipe .s { padding: 10px 16px; border-radius: 999px; background: var(--a-surface); border: 1px solid var(--a-line); font-weight: 650; font-size: .9rem; }
.a-pipe .arr { color: var(--a-muted); }

.a-bullets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 28px; margin: 0; padding: 0; list-style: none; }
.a-bullets li { font-size: .98rem; padding: 12px 14px; background: var(--a-surface); border: 1px solid var(--a-line); border-radius: 12px; }

.a-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.a-plan { background: var(--a-surface); border: 1px solid var(--a-line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.a-plan.hl { border-color: var(--a-accent); }
.a-plan .nm { font-weight: 700; text-transform: capitalize; }
.a-plan .pr { font-size: 1.6rem; font-weight: 800; }
.a-plan .note { color: var(--a-muted); font-size: .84rem; min-height: 1.2em; }
.a-plan .btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.a-plan .btns .a-btn { flex: 1; }

.a-cmp { border-radius: 14px; padding: 24px; border: 1px solid var(--a-line); background: var(--a-surface); }
.a-cmp.us { border: 2px solid var(--a-accent); }
.a-cmp p { margin: 0 0 9px; font-size: .92rem; color: var(--a-muted); }
.a-cmp.us p { color: var(--a-text); }
.a-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; text-align: center; }
.a-stat { background: var(--a-surface); border: 1px solid var(--a-line); border-radius: 14px; padding: 18px 8px; }
.a-stat b { display: block; font-size: 2.2rem; line-height: 1; }
.a-stat span { color: var(--a-muted); font-size: .78rem; }

.a-callout { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--a-surface); border: 1px solid var(--a-line); border-radius: 14px; padding: 20px 22px; }
.a-callout p { margin: 4px 0 0; color: var(--a-muted); font-size: .92rem; }

.a-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.a-stp { background: var(--a-surface); border: 1px solid var(--a-line); border-radius: 14px; padding: 18px; }
.a-stp.on { border-color: var(--a-accent); }
.a-stp .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem;
  background: var(--a-surface-2); margin-bottom: 10px; }
.a-stp.on .n { background: var(--a-accent); color: var(--a-accent-ink); }
.a-stp h4 { margin: 0 0 6px; font-size: 1rem; font-weight: 700; color: var(--a-text); }
.a-stp p { margin: 0; color: var(--a-muted); font-size: .88rem; }
/* /try (A0 sample-data demonstration): three steps; a dataset card is a link */
.a-steps.a-steps3 { grid-template-columns: repeat(3, 1fr); }
a.a-stp { display: block; text-decoration: none; }
a.a-stp:hover, a.a-stp:focus { border-color: var(--a-accent); }
.a-lab { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.a-ds { display: flex; flex-direction: column; gap: 8px; }
.a-ds button { text-align: left; background: var(--a-surface); color: var(--a-text); border: 1px solid var(--a-line); border-radius: 12px; padding: 12px 14px; font: inherit; }
.a-ds button:disabled { cursor: default; }
.a-ds button.sel { border-color: var(--a-accent); background: var(--a-surface-2); }
.a-ds small { display: block; color: var(--a-muted); font-size: .78rem; }
.a-scroll { overflow-x: auto; max-width: 100%; }      /* build item a: the preview table scrolls inside itself on a phone */
table.a-preview { width: 100%; min-width: 460px; border-collapse: collapse; font-size: .85rem; color: var(--a-text); }
table.a-preview th, table.a-preview td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--a-line); }
table.a-preview th { color: var(--a-muted); font-weight: 600; }
table.a-preview .tg { background: var(--a-surface-2); color: var(--a-accent); font-weight: 700; }

.a-lst-hero { padding: 64px 0 36px; background: radial-gradient(1100px 520px at 78% -10%, rgba(79,179,255,.22), transparent 60%), var(--a-bg); }
.a-lst-hero h1 { font-size: 3.1rem; line-height: 1.05; letter-spacing: -.025em; margin: 0 0 14px; font-weight: 800; color: var(--a-text); }
.a-item { display: grid; grid-template-columns: 84px minmax(0, 1fr) 380px; gap: 26px; padding: 34px 0; border-top: 1px solid var(--a-line); align-items: start; }
.a-item .num { font-size: 3.2rem; font-weight: 800; line-height: 1; color: var(--a-accent); }
.a-item h3 { margin: 0 0 8px; font-size: 1.5rem; letter-spacing: -.01em; font-weight: 700; color: var(--a-text); }
.a-item p { margin: 0 0 10px; color: var(--a-muted); }
.a-ex { background: var(--a-surface); border: 1px solid var(--a-line); border-radius: 14px; padding: 16px; font-size: .86rem; }
.a-ex dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 10px; margin: 0 0 12px; }
.a-ex dt { color: var(--a-muted); font-weight: 400; }
.a-ex dd { margin: 0; }
.a-ex .attr { color: var(--a-muted); font-size: .76rem; margin: 10px 0 0; }

/* /ai-predictions results (stored runs), the GUI flow and the ROI block */
.a-item.a-res { grid-template-columns: 84px minmax(0, 1fr) minmax(0, 1.5fr); }
.a-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0; font-size: .9rem; }
.a-facts dt { color: var(--a-muted); font-weight: 600; }
.a-facts dd { margin: 0; }
.a-verdict-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.a-verdict { font-weight: 800; letter-spacing: .06em; padding: 3px 10px; border-radius: 6px; font-size: .82rem;
  background: var(--a-surface-2); border: 1px solid var(--a-line); color: var(--a-text); }
.a-verdict.v-strong { background: var(--a-accent-2); color: var(--a-accent-ink); border-color: var(--a-accent-2); }
.a-verdict.v-moderate { background: var(--a-accent); color: var(--a-accent-ink); border-color: var(--a-accent); }
.a-verdict.v-weak, .a-verdict.v-not-assessed { background: transparent; color: var(--a-text); border-color: var(--a-muted); }
.a-hist { border-left: 2px solid var(--a-line); padding-left: 12px; margin-bottom: 14px; }
.a-hist ol { list-style: none; padding: 0; margin: 0; }
.a-hist li { margin-bottom: 10px; }
.a-hist li p { margin: 0 0 4px; }
.a-verdict-text { font-size: .9rem; color: var(--a-text); }
.a-sub-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--a-muted); margin: 16px 0 6px; font-weight: 700; }
.a-note { font-size: .84rem; color: var(--a-muted); margin: 6px 0; }
.a-mini { border-collapse: collapse; font-size: .84rem; margin: 6px 0 10px; min-width: 100%; }
.a-mini th, .a-mini td { border: 1px solid var(--a-line); padding: 4px 8px; text-align: right; white-space: nowrap; }
.a-mini th:first-child { text-align: left; }
.a-mini td.neg { color: var(--a-warn); }
.a-roi { border-top: 1px dashed var(--a-line); margin-top: 14px; padding-top: 4px; }
.a-roi p { color: var(--a-text); font-size: .9rem; }
.a-formula { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; background: var(--a-surface-2);
  padding: 6px 8px; border-radius: 6px; overflow-wrap: anywhere; }
.a-assume { margin: 6px 0 10px; padding-left: 18px; color: var(--a-muted); font-size: .88rem; }
.a-flow { list-style: none; counter-reset: flow; padding: 0; margin: 20px 0 0; display: grid; gap: 22px; }
.a-flow > li { counter-increment: flow; background: var(--a-surface); border: 1px solid var(--a-line); border-radius: 14px; padding: 18px; }
.a-flow > li h4::before { content: counter(flow) ". "; color: var(--a-accent); }
.a-flow h4 { margin: 0 0 6px; font-weight: 700; color: var(--a-text); }
.a-flow p { color: var(--a-muted); margin: 0 0 10px; }
.a-flow figure { margin: 10px 0 0; }
.a-flow img { display: block; max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--a-line); }

/* phone width: 16px gutters, no horizontal page scroll */
@media (max-width: 760px) {
  .a-wrap { padding: 0 16px; }
  .a-hero { padding: 40px 0 36px; }
  .a-hero-grid, .a-grid3, .a-grid2, .a-bullets, .a-lab, .a-item, .a-item.a-res { grid-template-columns: minmax(0, 1fr); }
  .a-hero h2 { font-size: 2.2rem; }
  .a-plans { grid-template-columns: minmax(0, 1fr); }
  .a-steps { grid-template-columns: 1fr 1fr; }
  .a-steps.a-steps3 { grid-template-columns: minmax(0, 1fr); }
  .a-stats { grid-template-columns: repeat(3, 1fr); }
  .a-lst-hero h1 { font-size: 2.2rem; }
  .a-item { gap: 10px; }
  .a-item .num { font-size: 2.2rem; }
  .a-mini { font-size: .78rem; }
  .a-mini th, .a-mini td { padding: 3px 4px; }
  .a-res .a-ex { padding: 12px; }
  .a-mini th { white-space: normal; }
  .a-lb { grid-template-columns: 96px 1fr 48px; }
}
