.prime-page {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prime-card {
  padding: 1.5rem;
}

.prime-hero {
  padding: 1.25rem 1.35rem;
}

.prime-hero-main {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}

.prime-ring-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.prime-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.prime-ring-bg {
  fill: none;
  stroke: rgba(148, 163, 184, 0.15);
  stroke-width: 10;
}

.prime-ring-fg {
  fill: none;
  stroke: #fbbf24;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 0.35s ease, stroke 0.25s ease;
}

.prime-ring-wrap.is-qualified .prime-ring-fg {
  stroke: #34d399;
}

.prime-ring-wrap.is-prime .prime-ring-fg {
  stroke: #fcd34d;
}

.prime-ring-wrap.is-missed .prime-ring-fg {
  stroke: #f87171;
}

.prime-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.prime-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #fbbf24;
}

.prime-hero-copy h1 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
}

.prime-status-msg {
  margin: 0.65rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #e2e8f0;
}

.prime-status-msg.is-qualified {
  color: #6ee7b7;
}

.prime-status-msg.is-missed {
  color: #fca5a5;
}

.prime-status-msg.is-prime {
  color: #fcd34d;
}

.prime-live-pill {
  display: inline-block;
  margin-top: 0.55rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

.prime-live-pill.is-prime {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fcd34d;
}

.prime-hero-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.prime-deadline {
  padding: 1rem 1.15rem;
}

.prime-deadline-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
}

.prime-deadline-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  overflow: hidden;
  margin-bottom: 0.45rem;
}

.prime-deadline-track span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #fbbf24);
  transition: width 0.35s ease, background 0.25s ease;
}

.prime-deadline-track span.past-deadline {
  background: linear-gradient(90deg, #f87171, #fb923c);
}

.prime-task-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
}

.prime-task {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.prime-task:last-child {
  border-bottom: none;
}

.prime-task.done {
  background: rgba(52, 211, 153, 0.04);
}

.prime-task.auto-done {
  background: rgba(251, 191, 36, 0.05);
}

.prime-task.auto-done.done {
  background: rgba(52, 211, 153, 0.06);
  border-left: 2px solid rgba(52, 211, 153, 0.45);
}

.prime-task-check {
  margin-top: 0.15rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #fbbf24;
  flex-shrink: 0;
}

.prime-task-check:disabled {
  opacity: 0.85;
  cursor: default;
}

.prime-task-ico {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.prime-task-body strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.prime-task-body .muted {
  font-size: 0.78rem;
  line-height: 1.4;
}

.prime-task-tag {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
}

.prime-tips {
  padding: 1rem 1.15rem 1.15rem;
}

.prime-tips h2 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
}

.prime-tips ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #cbd5e1;
  font-size: 0.86rem;
  line-height: 1.5;
}

.prime-tips li + li {
  margin-top: 0.35rem;
}

.prime-credit a {
  color: #7dd3fc;
}

/* Hub mini widget */
.prime-hub-mini {
  margin-top: 0.35rem;
}

.prime-hub-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  overflow: hidden;
  margin: 0.5rem 0 0.35rem;
}

.prime-hub-bar span {
  display: block;
  height: 100%;
  background: #fbbf24;
  border-radius: inherit;
  transition: width 0.3s ease;
}

.prime-hub-mini.is-qualified .prime-hub-bar span {
  background: #34d399;
}

/* Live HUD compact */
.nlh-prime-track {
  margin: 0.45rem 0 0.55rem;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.22);
  font-size: 0.68rem;
}

.nlh-prime-track.is-qualified {
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.28);
}

.nlh-prime-track.is-prime {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.45);
}

.nlh-prime-track-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.nlh-prime-track-head strong {
  color: #fcd34d;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nlh-prime-track-count {
  font-weight: 700;
  color: #fde68a;
}

.nlh-prime-mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nlh-prime-mini-list li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #94a3b8;
}

.nlh-prime-mini-list li.done {
  color: #cbd5e1;
}

.nlh-prime-mini-list li.done::before {
  content: '✓';
  color: #34d399;
  font-weight: 700;
}

.nlh-prime-mini-list li:not(.done)::before {
  content: '○';
  color: #64748b;
}

.nlh-prime-track a {
  display: inline-block;
  margin-top: 0.35rem;
  color: #7dd3fc;
  text-decoration: none;
  font-size: 0.62rem;
}

.nlh-prime-track a:hover {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .prime-hero-main {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ─── Floating Prime checklist box (Nexus) ─── */
.npc-box {
  position: fixed;
  z-index: 9996;
  font-size: 0.72rem;
  color: #e2e8f0;
}

.npc-box.hidden {
  display: none !important;
}

.npc-panel {
  background: rgba(10, 14, 22, 0.94);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-left: 3px solid #22d3ee;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.npc-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.5rem 0.45rem 0.35rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.08), transparent);
}

.npc-head-main {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.npc-crown {
  font-size: 0.85rem;
  line-height: 1;
}

.npc-title {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.npc-badge {
  flex-shrink: 0;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.12rem 0.38rem;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.08);
}

.npc-count {
  font-size: 0.62rem;
  font-weight: 700;
  color: #94a3b8;
  flex-shrink: 0;
}

.npc-box.npc-qualified .npc-count {
  color: #6ee7b7;
}

.npc-box.npc-prime .npc-count {
  color: #fcd34d;
}

.npc-collapse {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.15rem 0.25rem;
  line-height: 1;
}

.npc-body {
  padding: 0.45rem 0.55rem 0.55rem;
}

.npc-box.npc-collapsed .npc-body {
  display: none;
}

.npc-sync {
  margin: 0 0 0.4rem;
  font-size: 0.58rem;
  line-height: 1.35;
  color: #64748b;
}

.npc-sync.ok {
  color: #6ee7b7;
}

.npc-sync.wait {
  color: #94a3b8;
}

.npc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.npc-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  line-height: 1.35;
  color: #cbd5e1;
}

.npc-row.done {
  color: #4ade80;
}

.npc-row.failed {
  color: #f87171;
}

.npc-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  margin-top: 0.28rem;
  flex-shrink: 0;
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.45);
}

.npc-row.done .npc-dot {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.45);
}

.npc-row.failed .npc-dot {
  background: #ef4444;
}

.npc-row-label {
  flex: 1;
}

.npc-prog {
  color: #94a3b8;
  font-size: 0.58rem;
}

.npc-row.done .npc-prog {
  color: rgba(74, 222, 128, 0.75);
}

.npc-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.npc-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.38rem 0.45rem;
  border-radius: 6px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.8);
  color: #e2e8f0;
}

.npc-btn-ico {
  font-size: 0.7rem;
  opacity: 0.85;
}

.npc-btn-details:hover {
  border-color: rgba(148, 163, 184, 0.55);
  color: #fff;
}

.npc-btn-new {
  border-color: rgba(34, 197, 94, 0.45);
  color: #4ade80;
  background: rgba(34, 197, 94, 0.06);
}

.npc-btn-new:hover {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.npc-box .nfw-drag-handle {
  border: none;
  background: transparent;
  color: #64748b;
  cursor: grab;
  padding: 0.1rem 0.2rem;
  font-size: 0.85rem;
  line-height: 1;
}

@media (max-width: 560px) {
  .npc-box {
    max-width: calc(100vw - 16px);
  }
}
