/* Analyze hub (templates/analyze.html). Colors come from the site tokens (site.css, brand.css) so the light
   theme works; the track colors are only used for icons, borders and tints. */
.ah { max-width: var(--maxw); margin: 0 auto; padding: 0 16px 90px; }
@media (min-width: 900px) { .ah { padding: 0 24px 90px; } }

/* hero */
.ah-hero { padding: 44px 0 30px; border-bottom: 1px solid var(--line); }
.ah-hero-grid { display: grid; gap: 34px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
@media (max-width: 860px) { .ah-hero-grid { grid-template-columns: 1fr; } }
.ah-hero h1 { margin: 10px 0 12px; }
.ah-hero .lead { margin: 0; max-width: 60ch; }
.ah-hero .hstack { margin-top: 20px; }
.ah-pipe { list-style: none; margin: 0; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  display: grid; gap: 12px; }
.ah-pipe li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px 12px; align-items: center; position: relative; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.ah-pipe li + li::before { content: ""; position: absolute; left: 25px; top: -12px; width: 2px; height: 12px; background: var(--line-strong, var(--line)); }
.ah-pipe .ah-n { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: var(--fs-sm);
  background: var(--accent-soft); color: var(--accent); }
.ah-pipe b { font-size: var(--fs-base); color: var(--ink); }
.ah-pipe span { font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }
.ah-pipe li:nth-child(4) { border-color: var(--accent); }

/* section headings */
.ah-h { margin: 46px 0 14px; font-size: var(--fs-lg); }
.ah-sub { margin: -6px 0 16px; color: var(--muted); font-size: var(--fs-sm); max-width: 70ch; }

/* pick your starting point */
.ah-picks { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.ah-pick { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ah-pick h3 { margin: 0; font-size: var(--fs-base); }
.ah-pick > p { margin: 0 0 6px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.ah-links { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 2px; }
.ah-links li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.ah-links a { color: var(--ink); text-decoration: none; font-weight: 600; } .ah-links a:hover { color: var(--accent); }
.ah-min { flex: none; font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }

/* learning path */
.ah-path { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; grid-template-columns: repeat(5, minmax(0, 1fr)); counter-reset: p; }
@media (max-width: 1000px) { .ah-path { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ah-path { grid-template-columns: 1fr; gap: 12px; } }
.ah-step { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ah-step:not(:last-child)::after { content: ""; position: absolute; right: -15px; top: 50%; width: 8px; height: 8px; border: solid var(--muted); border-width: 2px 2px 0 0; transform: translateY(-50%) rotate(45deg); }
@media (max-width: 1000px) { .ah-step:nth-child(2n)::after { display: none; } }
@media (max-width: 560px) { .ah-step::after { display: none !important; } }
.ah-step-n { font-size: var(--fs-xs); font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.ah-step b { font-size: var(--fs-base); color: var(--ink); }
.ah-step > span { font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; }
.ah-step-tracks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.ah-step-tracks a { font-size: var(--fs-xs); font-weight: 700; color: var(--ink); text-decoration: none; padding: 3px 9px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--tc) 55%, var(--line)); background: color-mix(in srgb, var(--tc) 13%, var(--surface)); }
.ah-step-tracks a:hover { border-color: var(--tc); }
.ah-note { margin: 12px 0 0; font-size: var(--fs-xs); color: var(--muted); }

/* track sections */
.ah-track { margin-top: 26px; padding: 22px; border: 1px solid var(--line); border-left: 4px solid var(--tc, var(--accent)); border-radius: 14px; background: var(--surface); scroll-margin-top: 84px; }
.ah-track-head { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 16px; align-items: center; margin-bottom: 16px; }
.ah-ico { grid-row: span 2; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: var(--tc, var(--accent));
  background: color-mix(in srgb, var(--tc, var(--accent)) 16%, var(--surface)); }
.ah-ico svg { width: 28px; height: 28px; }
.ah-track-head h2 { margin: 0; font-size: var(--fs-lg); }
.ah-track-head p { margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; max-width: 80ch; }
.ah-count { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* guide cards */
.ah-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.ah-g { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.ah-g:hover { border-color: var(--tc, var(--accent)); transform: translateY(-2px); }
.ah-g:focus-visible { outline: 3px solid var(--accent-ring, rgba(79,139,255,.35)); outline-offset: 2px; }
.ah-g h3 { margin: 0; font-size: var(--fs-base); line-height: 1.3; }
.ah-g p { margin: 0; font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; }
.ah-g-meta { margin-top: auto; padding-top: 6px; display: flex; gap: 8px; align-items: center; font-size: var(--fs-xs); color: var(--muted); }
.ah-lvl { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); }
.lv-beg { background: color-mix(in srgb, #34d399 18%, var(--surface)); border-color: color-mix(in srgb, #34d399 50%, var(--line)); }
.lv-int { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.lv-adv { background: color-mix(in srgb, #f59e0b 18%, var(--surface)); border-color: color-mix(in srgb, #f59e0b 55%, var(--line)); }

/* see it working */
.ah-more .ah-g { border-left: 3px solid var(--accent); }
.ah-more .ah-g-meta { color: var(--accent); font-weight: 600; }
