/* Career Path - Route look. Everything is scoped to .cpv (and body.cpv-page) so it can't leak into other pages. */

body.cpv-page {
  background:
    radial-gradient(70% 38% at 12% 0%, rgba(110, 160, 255, 0.16), transparent 70%),
    radial-gradient(70% 38% at 88% 0%, rgba(255, 190, 110, 0.12), transparent 70%),
    #060a13;
  background-attachment: fixed;
}
@media (max-width: 640px) {
  body.cpv-page .site-header, body.cpv-page .circuit-bar { position: static; }
}
body.cpv-page .bk-htp-reopen { display: none !important; }
.cpv-h1 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.cpv {
  --panel: #0e1526;
  --panel2: #131c33;
  --line: rgba(255, 255, 255, 0.1);
  --acc: #ff7a2e;
  --txt: #f3f5fa;
  --dim: #9aa6bd;
  --ok: #38c977;
  max-width: 460px;
  margin: 0 auto;
  padding: 6px 0 28px;
  color: var(--txt);
}
.cpv button { font-family: inherit; }

/* ---------- HUD ---------- */
.cpv .cp-hud { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px 10px; padding: 8px 2px 6px; }
.cpv .cp-brand { white-space: nowrap; font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: 24px; line-height: 1; letter-spacing: .02em; color: var(--txt); }
.cpv .cp-brand small { display: block; font-family: var(--font-body, Inter, sans-serif); font-size: 9.5px; letter-spacing: .22em; font-weight: 700; color: var(--acc); margin-top: 3px; }
.cpv .cp-pts { display: flex; align-items: baseline; gap: 3px; padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(255, 207, 92, .45); background: rgba(255, 207, 92, .08); line-height: 1; }
.cpv .cp-pts b { font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: 24px; color: #ffcf5c; font-weight: 400; font-variant-numeric: tabular-nums; }
.cpv .cp-pts span { font-size: 10px; font-weight: 800; letter-spacing: .12em; color: #ffcf5c; }
.cpv .cp-pts.drop b { animation: cpDrop .5s ease; }
@keyframes cpDrop { 0% { transform: translateY(-9px) scale(1.4); opacity: .3; } 100% { transform: none; opacity: 1; } }
.cpv .cp-hudr { display: flex; align-items: center; gap: 8px; }
.cpv .cp-timer { font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: 28px; line-height: 1; color: var(--txt); min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.cpv .cp-snd { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--txt); font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cpv .cp-snd[aria-pressed="false"] { opacity: .5; }
.cpv .cp-prog { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.cpv .cp-segs { flex: 1; display: flex; gap: 3px; }
.cpv .cp-segs i { flex: 1; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .1); transition: background .3s, box-shadow .3s; }
.cpv .cp-segs i.f { background: var(--acc); box-shadow: 0 0 8px rgba(255, 122, 46, .55); }
.cpv .cp-count { font-weight: 800; font-size: 13px; color: var(--txt); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- date nav + banner ---------- */
.cpv .cp-date-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 2px 0 6px; }
.cpv .cp-date-arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--txt); font-size: 16px; cursor: pointer; }
.cpv .cp-date-arrow:disabled { opacity: .3; cursor: not-allowed; }
.cpv .cp-date-label { font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: 18px; color: var(--acc); min-width: 90px; text-align: center; }
.cpv .cp-meta { border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(170deg, rgba(255, 122, 46, .12), transparent 55%), var(--panel); padding: 10px 14px; margin: 0 0 10px; }
.cpv .cp-meta .t { font-weight: 800; font-size: 16px; }
.cpv .cp-meta .s { font-size: 12px; color: var(--dim); margin-top: 2px; }

/* ---------- the route ---------- */
.cpv .cp-routebox { position: relative; }
.cpv .cp-route { border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 30%), var(--panel); padding: 16px 14px 14px; display: flex; flex-direction: column; gap: 14px; }
.cpv .stop { position: relative; display: flex; align-items: flex-start; gap: 13px; min-height: 48px; }
.cpv .stop::after { content: ""; position: absolute; left: 23px; top: 50px; bottom: -14px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .22) 0 5px, transparent 5px 10px); transform-origin: top; }
.cpv .stop:last-child::after { display: none; }
.cpv .stop.linked::after { background: var(--acc); box-shadow: 0 0 8px rgba(255, 122, 46, .45); }
.cpv .stop.drawing::after { animation: cpDraw .55s ease-out; }
@keyframes cpDraw { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.cpv .disc { position: relative; width: 48px; height: 48px; border-radius: 50%; flex: none; box-shadow: 0 3px 8px rgba(0, 0, 0, .45); z-index: 1; }
.cpv .disc b { position: absolute; inset: 6px; border-radius: 50%; background: #0b1020; display: flex; align-items: center; justify-content: center; font: 800 12px/1 var(--font-body, Inter, sans-serif); letter-spacing: .02em; color: #fff; }
.cpv .disc.q { background: transparent !important; box-shadow: none; border: 2px dashed rgba(255, 255, 255, .28); }
.cpv .disc.q b { inset: 0; background: rgba(255, 255, 255, .03); color: #7d89a6; font-size: 18px; font-weight: 600; }

.cpv .stop-body { flex: 1; min-width: 0; padding-top: 2px; }
.cpv .stop-name { font-weight: 800; font-size: 16px; line-height: 1.2; overflow-wrap: anywhere; }
.cpv .stop-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 5px; align-items: center; }
.cpv .chip { font-size: 11.5px; font-weight: 700; color: #c9d2e6; background: rgba(255, 255, 255, .07); border-radius: 7px; padding: 3px 7px; white-space: nowrap; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cpv .chip b { color: var(--txt); font-weight: 800; }
.cpv .chip.yrs { color: #ffcf5c; background: rgba(255, 207, 92, .1); }
.cpv .stop.pend .stop-name { color: #7d89a6; font-weight: 600; font-size: 14px; padding-top: 4px; }
.cpv .sk { display: inline-block; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .06); }
.cpv .sk.a { width: 54px; } .cpv .sk.b { width: 78px; }
.cpv .stop.pend .stop-meta { margin-top: 8px; }
.cpv .stop.new .stop-body { animation: cpSlide .45s ease-out; }
.cpv .stop.new .disc { animation: cpPop .7s cubic-bezier(.2, 1.5, .3, 1); }
.cpv .stop.new .disc::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 3px solid rgba(255, 122, 46, .9); animation: cpRing .8s ease-out forwards; pointer-events: none; }
@keyframes cpSlide { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@keyframes cpPop { 0% { transform: scale(.4); } 50% { transform: scale(1.22); } 100% { transform: scale(1); } }
@keyframes cpRing { from { transform: scale(1); opacity: .9; } to { transform: scale(2.1); opacity: 0; } }
.cpv .stop.late { opacity: .55; }
.cpv .stop.solved .disc { box-shadow: 0 0 0 3px #0e1526, 0 0 0 5px var(--ok), 0 0 14px rgba(56, 201, 119, .6); }
.cpv .stop.solved .chip.here { color: #bff0d3; background: rgba(56, 201, 119, .16); }
.cpv .cp-note { margin: 8px 4px 0; font-size: 11px; color: var(--dim); line-height: 1.4; }

/* ---------- effects ---------- */
.cpv .cp-routebox.shake { animation: cpShake .42s ease; }
@keyframes cpShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.cpv .cp-flash { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 5; }
.cpv .cp-flash .rc { display: none; flex-direction: column; align-items: center; gap: 10px; }
.cpv .cp-flash.show .rc { display: flex; animation: cpCard 1.05s ease forwards; }
.cpv .cp-flash .rc i { width: 54px; height: 76px; border-radius: 8px; background: linear-gradient(160deg, #ff5a5a, #c4161c); box-shadow: 0 8px 26px rgba(239, 60, 60, .55); transform: rotate(-10deg); }
.cpv .cp-flash .rc b { font: 800 12px var(--font-body, Inter, sans-serif); letter-spacing: .16em; text-transform: uppercase; color: #fff; background: rgba(6, 10, 19, .85); padding: 5px 10px; border-radius: 8px; }
@keyframes cpCard { 0% { opacity: 0; transform: translateY(24px) scale(.6); } 18% { opacity: 1; transform: translateY(0) scale(1.08); } 80% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-14px) scale(1); } }
.cp-conf { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 80; }

/* ---------- dock ---------- */
.cpv .cp-dock { position: sticky; bottom: 0; z-index: 20; margin-top: 10px; padding: 8px 10px 10px; border-radius: 16px; border: 1px solid var(--line); background: rgba(10, 16, 32, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.cpv .cp-dock-status { min-height: 18px; text-align: center; font-size: 13px; color: var(--dim); margin-bottom: 6px; line-height: 1.35; }
.cpv .cp-dock-status.error { color: #ff7b7b; font-weight: 700; }
.cpv .cp-dock-status.hint { color: #ffcf5c; font-weight: 700; }
.cpv .cp-dock-row { display: flex; gap: 8px; align-items: stretch; }
.cpv #cp-input { width: 100%; box-sizing: border-box; font-size: 16px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid rgba(255, 255, 255, .16); background: #0a1122; color: var(--txt); }
.cpv #cp-input:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(255, 122, 46, .2); }
.cpv #cp-input.flash-wrong { border-color: #ef3c3c; animation: cpShake .4s ease; }
.cpv .cp-dock-row .bk-ac-wrap { flex: 1; min-width: 0; display: block; position: relative; }
.cpv .cp-dock-row .bk-ac-list { top: auto !important; bottom: calc(100% + 8px) !important; left: 0; right: 0; max-height: 220px; overflow-y: auto; z-index: 40; background: #0a1122; border: 1px solid rgba(255, 255, 255, .18); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); }
.cpv .cp-dock-row .bk-ac-list > * { color: var(--txt); }
.cpv #cp-guess-btn { flex: none; border: 0; border-radius: 12px; padding: 0 18px; font: 800 14px var(--font-body, Inter, sans-serif); letter-spacing: .06em; text-transform: uppercase; color: #111; background: linear-gradient(135deg, #ffb347, #ff7a2e); cursor: pointer; }
.cpv .cp-dock-sub { display: flex; justify-content: space-between; margin-top: 6px; }
.cpv .cp-link { background: none; border: 0; color: var(--dim); font: 600 12px var(--font-body, Inter, sans-serif); text-decoration: underline; cursor: pointer; padding: 6px 4px; }

/* ---------- result ---------- */
.cpv .result-box { margin-top: 12px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(170deg, rgba(255, 122, 46, .14), transparent 40%), var(--panel); padding: 18px 14px 16px; text-align: center; animation: cpRise .45s ease; }
.cpv .result-box.wrong { background: linear-gradient(170deg, rgba(239, 60, 60, .14), transparent 40%), var(--panel); }
@keyframes cpRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.cpv .cp-kicker { font-size: 10px; letter-spacing: .24em; font-weight: 800; color: var(--dim); }
.cpv .result-name { font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: 36px; line-height: 1.05; text-transform: uppercase; margin-top: 6px; }
.cpv .result-score { font-family: var(--font-display, 'Jersey 15', sans-serif); font-size: 58px; line-height: 1; color: var(--acc); margin-top: 6px; }
.cpv .result-score small { font-size: 22px; color: var(--dim); }
.cpv .result-score .tm { display: block; font-size: 20px; color: var(--txt); margin-top: 2px; }
.cpv .result-label { margin-top: 6px; font-size: 14px; color: var(--txt); line-height: 1.4; }
.cpv .result-label b { display: block; font-size: 17px; margin-bottom: 2px; }
.cpv .result-label span { color: var(--dim); font-size: 13px; }
.cpv .cp-emoji { white-space: pre; font-size: 22px; line-height: 1.3; margin: 12px 0 6px; user-select: all; -webkit-user-select: all; }
.cpv .cp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.cpv .cp-actions .btn { border-radius: 12px; padding: 13px 10px; font: 800 14px var(--font-body, Inter, sans-serif); cursor: pointer; border: 1px solid var(--line); background: var(--panel2); color: var(--txt); }
.cpv .cp-actions .btn.primary { background: linear-gradient(135deg, #ffb347, #ff7a2e); color: #111; border-color: transparent; }
.cpv .cp-actions .btn.full { grid-column: 1 / -1; }
.cpv .bk-lb { margin-top: 14px; }
.cpv .faq-section { margin-top: 22px; }

@media (max-width: 380px) {
  .cpv .cp-brand { font-size: 22px; }
  .cpv .stop-name { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .cpv .stop.new .stop-body, .cpv .stop.new .disc, .cpv .stop.new .disc::after, .cpv .stop.drawing::after, .cpv .cp-routebox.shake, .cpv .cp-pts.drop b { animation: none; }
}
