.level-step { border-left: 4px solid var(--bs-secondary-bg); padding-left: 1rem; }
.level-step.completed { border-color: var(--ok); }
.level-step.current { border-color: var(--accent); }
.level-step.locked { opacity: .55; }
.skill-card.locked { opacity: .6; }
.skill-card { transition: transform .1s; }
.skill-card:hover { transform: translateY(-2px); }
.stat { font-size: 2.2rem; font-weight: 700; color: var(--accent); line-height: 1; font-family: var(--font-display); }
video { width: 100%; max-height: 70vh; background: #000; border-radius: .5rem; }

/* ---- path graph ---- */
.path-graph-wrap { overflow-x: auto; }
.path-graph { width: 100%; max-width: 1100px; height: auto; display: block; margin: 0 auto; }
.pg-edge { fill: none; stroke-width: 2.5; }
.pg-edge-done { stroke: var(--bs-success); }
.pg-edge-active { stroke: var(--accent); }
.pg-edge-locked { stroke: var(--bs-secondary-color); stroke-dasharray: 6 6; opacity: .5; }
.pg-arrow-done { fill: var(--bs-success); }
.pg-arrow-active { fill: var(--accent); }
.pg-arrow-locked { fill: var(--bs-secondary-color); opacity: .5; }
.pg-disc { stroke-width: 3; fill: var(--bs-body-bg); }
.pg-inner { fill: none; stroke-width: 1; stroke-dasharray: 3 4; opacity: .6; }
.pg-icon { font-family: "bootstrap-icons"; text-anchor: middle; dominant-baseline: central; }
.pg-label { fill: var(--bs-body-color); font-size: 15px; font-weight: 600; text-anchor: middle; }
.pg-label-lg { font-size: 19px; }
.pg-sub { fill: var(--bs-secondary-color); font-size: 13px; text-anchor: middle; }
.pg-completed .pg-disc, .pg-completed .pg-inner { stroke: var(--bs-success); }
.pg-completed .pg-icon { fill: var(--bs-success); }
.pg-available .pg-disc, .pg-available .pg-inner { stroke: var(--accent); }
.pg-available .pg-icon { fill: var(--accent); }
.pg-available .pg-halo { fill: none; stroke: var(--accent); stroke-width: 2; animation: pg-pulse 2s ease-in-out infinite; }
.pg-pending .pg-disc, .pg-pending .pg-inner { stroke: var(--bs-warning); }
.pg-pending .pg-icon { fill: var(--bs-warning); }
.pg-locked { opacity: .45; }
.pg-locked .pg-disc, .pg-locked .pg-inner { stroke: var(--bs-secondary-color); }
.pg-locked .pg-icon { fill: var(--bs-secondary-color); }
.pg-level .pg-disc { stroke-width: 4; }
.pg-finish.pg-completed .pg-icon { fill: #ffc107; }
.pg-link { text-decoration: none; }
.pg-link .pg-node { cursor: pointer; transition: transform .15s; transform-box: fill-box; transform-origin: center; }
.pg-link:hover .pg-disc { fill: var(--bs-secondary-bg); }
.pg-key { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 3px solid; vertical-align: -1px; }
.pg-key.pg-completed { border-color: var(--bs-success); }
.pg-key.pg-available { border-color: var(--accent); }
.pg-key.pg-pending { border-color: var(--bs-warning); }
.pg-key.pg-locked { border-color: var(--bs-secondary-color); opacity: 1; }
@keyframes pg-pulse { 0%, 100% { opacity: .25; } 50% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .pg-available .pg-halo { animation: none; opacity: .6; } }

/* ---- 7-day activity chart (status colors: good / warning / critical) ---- */
:root { --st-good: var(--ok); --st-warning: var(--warn); --st-critical: var(--bad); }
.ac-wrap { position: relative; }
.ac-chart { width: 100%; height: auto; display: block; overflow: visible; }
.ac-axis { stroke: var(--bs-border-color); stroke-width: 1; }
.ac-hit { fill: transparent; }
.ac-col:hover .ac-hit, .ac-col:focus .ac-hit { fill: var(--bs-secondary-bg); opacity: .5; }
.ac-col:focus { outline: none; }
.ac-approved { fill: var(--st-good); }
.ac-pending { fill: var(--st-warning); }
.ac-rejected { fill: var(--st-critical); }
.ac-cap { fill: var(--bs-body-color); font-size: 13px; font-weight: 600; text-anchor: middle; font-variant-numeric: tabular-nums; }
.ac-day { fill: var(--bs-secondary-color); font-size: 12px; text-anchor: middle; }
.ac-today { fill: var(--bs-body-color); font-weight: 600; }
.ac-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: 0; }
.ac-swatch.ac-approved { background: var(--st-good); }
.ac-swatch.ac-pending { background: var(--st-warning); }
.ac-swatch.ac-rejected { background: var(--st-critical); }
.ac-icon-approved { color: var(--st-good); }
.ac-icon-pending { color: var(--st-warning); }
.ac-icon-rejected { color: var(--st-critical); }
.ac-tip { position: absolute; pointer-events: none; z-index: 5; min-width: 160px; padding: .5rem .65rem;
  font-size: .8rem; background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); border-radius: .4rem;
  box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.ac-table td, .ac-table th { font-variant-numeric: tabular-nums; }

/* ---- dashboard ---- */
.note-item { display: flex; gap: .65rem; padding: .6rem .75rem; text-decoration: none; color: inherit; border-bottom: 1px solid var(--bs-border-color); }
.note-item:last-child { border-bottom: 0; }
.note-item:hover { background: var(--bs-tertiary-bg); }
.note-item.unread { background: rgba(255, 106, 0, .07); }
.note-item.unread .note-msg { font-weight: 600; }
.note-icon { font-size: 1.1rem; line-height: 1.3; }
.note-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; margin-top: .45rem; }
.ac-legend > span { white-space: nowrap; display: inline-block; }
@media (max-width: 576px) {
  /* SVG text is in viewBox units; bump it so it stays ~11px when the chart shrinks */
  .ac-cap { font-size: 20px; }
  .ac-day { font-size: 17px; }
  }

/* Focus rings on links: only after the visitor starts using the keyboard on this page
   (html.kbd is set by base.html), so a page load or Back navigation never leaves a stray ring. */
html:not(.kbd) a:focus { outline: none; box-shadow: none; }
html.kbd a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: .375rem; box-shadow: none; }

.ai-pre { white-space: pre-wrap; max-height: 260px; overflow: auto; font-size: .75rem; background: var(--bs-tertiary-bg); padding: .5rem; border-radius: .375rem; }

/* ---- calmer layout ---- */
.page-narrow { max-width: 860px; margin: 0 auto; }
.week-numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.week-numbers .n { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.week-numbers .l { color: var(--bs-secondary-color); font-size: .85rem; }
.level-fold > summary { list-style: none; cursor: pointer; }
.level-fold > summary::-webkit-details-marker { display: none; }
.level-fold .fold-icon { transition: transform .15s; }
.level-fold[open] .fold-icon { transform: rotate(180deg); }
.level-fold:not([open]) > summary { border-bottom: 0; }
.bulk-bar { position: sticky; top: .5rem; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap; padding: .6rem 1rem; margin-bottom: 1rem; border-radius: .5rem;
  background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.bulk-bar[hidden] { display: none; }

/* ---- prizes ---- */
.prize-card { overflow: hidden; }
.prize-card.is-affordable { border-color: color-mix(in srgb, var(--accent) 55%, var(--bs-border-color)); }
.prize-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bs-tertiary-bg); }
.prize-img-empty { display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--bs-secondary-color); }
.prize-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: .375rem; background: var(--bs-tertiary-bg); flex: none; }
.prize-thumb.prize-img-empty { font-size: 1.4rem; }
.prize-cost { white-space: nowrap; font-weight: 700; }
.prize-cost .bi { color: var(--st-warning); }
.prize-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.qr-img { width: 100%; max-width: 240px; background: #fff; padding: 8px; border-radius: .5rem; }
